statrs-dev / statrs

Statistical computation library for Rust

Home Page:https://docs.rs/statrs/latest/statrs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README out of date

reknih opened this issue · comments

The first example in the README is outdated.

  • The rand crate's StdRng does no longer have a new constructor. Consider using from_entropy or from_seed instead.
  • Starting at version 0.1.0, statrs does no longer include a Distribution trait and instead relies on rands Distribution.

I did not try the other examples yet, but I think it would be great to fix this since the Readme (exp. when viewed on crates.io) is the first point of contact with the crate for many users. Thankfully, the documentation on docs.rs is up-to-date and very useful! Also consider removing the instruction to add the extern crate statrs line in the Usage section since most users should be on Rust's 2018 edition by now.

commented

Agreed.

Trying to use rand and statsr is a nightmare of changing APIs and out-of-date documentation for a newcomer.
It shouldn't take multiple trips to doc.rs and github to figure out how to sample a binomial distribution.

Thankfully, the documentation on docs.rs is up-to-date and very useful!

And only works if you use old versions of rand.

Trying to use rand and statsr is a nightmare of changing APIs and out-of-date documentation for a newcomer.
It shouldn't take multiple trips to doc.rs and github to figure out how to sample a binomial distribution.

We recommend opening an issue if something is confusing. Occasionally things get lost.

Thanks for the report, I've updated the README to match current git.