log_mix(container, container) should check first argument is simplex
Open
Nobody has claimed this yet.
feature
good first issue
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the collection overload of log_mix and the validation tests for its arguments. Reproduce the issue with the Stan example in the report, then add coverage showing that a non-simplex first argument is rejected and confirm the existing valid cases still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100