Hello,
distributions::Uniform::from panics when the given range is invalid.
In contrast distributions::Bernoulli::new returns an Option object if the given probability is invalid.
It comes to a surprise that seemingly similar functions have different API design. Is there a particular reason for this?
Hello,
distributions::Uniform::frompanics when the given range is invalid.In contrast
distributions::Bernoulli::newreturns an Option object if the given probability is invalid.It comes to a surprise that seemingly similar functions have different API design. Is there a particular reason for this?