Skip to content

Fix some issues with samplers - #154

Open
ameligrana wants to merge 2 commits into
mainfrom
fixes
Open

ameligrana wants to merge 2 commits into
mainfrom
fixes

Conversation

@ameligrana

@ameligrana ameligrana commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Some notable issues needed to be fixed.

Thanks to @mharinat for noticing and reporting the biased get of WRAExp-J and the off-by-one error in the binomial CDF computation.

The rest of the fixes are mostly related to merging reservoirs, which indeed is a less battle tested part of the library.

When the merged reservoirs saw fewer than n elements in total, they are
all still filling up. merge/merge! now concatenate their raw elements
(with shifted cumulative weights for AlgWRSWRSKIP) instead of drawing n
samples, which biased value() and made AlgWRSWRSKIP throw.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant