-
Notifications
You must be signed in to change notification settings - Fork 120
refactor(distribution): move inverse_cdf panic checks to try_inverse_cdf #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
fe1faed
2c4e94f
3d5b995
9d4a0a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,9 +185,6 @@ impl ContinuousCDF<f64, f64> for Gamma { | |
| } | ||
|
|
||
| fn inverse_cdf(&self, p: f64) -> f64 { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fter removing the domain panic, Checked against scipy 1.17 / mpmath:
The new path hangs on those inputs. |
||
| if !(0.0..=1.0).contains(&p) { | ||
| panic!("default inverse_cdf implementation should be provided probability on [0,1]") | ||
| } | ||
| if p == 0.0 { | ||
| return self.min(); | ||
| }; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it means the same in code below, are u sure we need explanation of code which is longer then code?