You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the reason for adopting this odd behaviour? It seems to me that the most sensible thing to do would be to return 0 if shape isn't NaN or (+-)INFINITY. This is just one instance, as there seem to be a couple of other odd return values.
impl Mean<f64> for Gamma {
/// Returns the mean of the gamma distribution
///
/// # Remarks
///
/// Returns `shape` if `rate == f64::INFINITY`. This behavior
/// is borrowed from the Math.NET implementation
///
/// # Formula
///
/// ```ignore
/// α / β
/// ```
///
/// where `α` is the shape and `β` is the rate
The text was updated successfully, but these errors were encountered:
A lot of these as indicated by the doc-string were borrowed behavior from Math.NET but I agree that not all of this behavior is necessarily correct. Looking through the commits of the Math.NET source I don't see a good reason for this particular method to not return 0, I'm happy to accept any PRs addressing this and other odd behavior you've seen
What is the reason for adopting this odd behaviour? It seems to me that the most sensible thing to do would be to return 0 if
shape
isn't NaN or (+-)INFINITY. This is just one instance, as there seem to be a couple of other odd return values.The text was updated successfully, but these errors were encountered: