statrs-dev / statrs

Statistical computation library for Rust
https://docs.rs/statrs/latest/statrs/
MIT License
546 stars 78 forks source link

fix laplace distribution sampling #151

Closed boxtown closed 2 years ago

boxtown commented 2 years ago

Sampling has a bug where negative values are not being generated due to missing abs() for random variable. See https://github.com/statrs-dev/statrs/issues/150

This PR fixes that issue and adds a sanity check test for sampling to ensure balanced draws. Also fixes https://github.com/statrs-dev/statrs/issues/149

vi commented 2 years ago

Maybe the test can be extended to all symmetric distributions, not just the Laplace one?

troublescooter commented 2 years ago

LGTM

vi commented 2 years ago

When to expect the fix to propagate to crates.io?

vi commented 1 year ago

Why this and other accepted fixes are being withheld from crates.io?