Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A log_add_exp function that returns containers #3127

Open
WardBrian opened this issue Nov 15, 2024 · 0 comments
Open

A log_add_exp function that returns containers #3127

WardBrian opened this issue Nov 15, 2024 · 0 comments

Comments

@WardBrian
Copy link
Member

It would be nice to have a function that works like log_sum_exp but elementwise, so the return was also a container.

I have a similar issue with log_sum_exp where I wanted it to vector[n] a = log_sum_exp(vector[n] b, vector[n] c) across each element, however it doesn't do this type of elementwise sum. Maybe if we had a log_add_exp which I've seen in other languages.

Originally posted by @spinkney in stan-dev/docs#832 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant