Skip to content

A log_add_exp function that returns containers #3127

Open
@WardBrian

Description

@WardBrian

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions