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

log_mix(container, container) should check first argument is simplex #3125

Open
bob-carpenter opened this issue Nov 14, 2024 · 1 comment
Open

Comments

@bob-carpenter
Copy link
Contributor

Description

The function log_mix taking two collections does not check that the first container is a simplex.

Expected Output

Rejection when the first argument is not a simplex, e.g.,

target += log_mix({0.5, 0.9}, {-1.2, -4.2});

Current Version:

v4.9.0

@WardBrian
Copy link
Member

If I had to theorize as to why it does not, it seems like check_simplex might not have overloads for non-Eigen containers:
https://github.com/stan-dev/math/blob/develop/stan/math/prim/err/check_simplex.hpp

So that's a good place to start

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

2 participants