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)
It would be nice to have a function that works like log_sum_exp but elementwise, so the return was also a container.
Originally posted by @spinkney in stan-dev/docs#832 (comment)