-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Make numerical and probability doctests ready for random seeds #29975
Comments
comment:1
|
Branch: public/29975 |
Commit: |
Author: Jonathan Kliem |
comment:4
Although this is unlikely to fail, the test should agree with the documentation, so please apply this change for the uniform distribution: Uniform distribution on the interval ``[a, b]``::
sage: a = 0
sage: b = 2
sage: T = RealDistribution('uniform', [a, b])
- sage: a <= T.get_random_element() < b
+ sage: a <= T.get_random_element() <= b
True For the Pareto distribution, you could also add a test that Finally, I think this test should document the expected outcome, for clarity: sage: [1.0*x/nr_samples for x in counts] # abs tol 1e-1
- [0.304200000000000, 0.397300000000000, 0.298500000000000]
+ [0.3, 0.4, 0.3] I hope it is sufficiently unlikely that this test fails, but it is not impossible. |
Reviewer: Markus Wageringel |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
Thanks for improving the doctests. Replying to @mwageringel:
I even modified it down to |
comment:9
Thanks for the updates. The change to multigraphics seems unintentional – I have removed it from your commit. I have also fixed another doctest:
You can set this to positive if you agree with my changes. |
comment:10
Thank you. Yes, agreed. |
Changed branch from public/29975 to |
This ticket makes
pass for different values n than just 0.
Depends on #29962
Component: doctest framework
Author: Jonathan Kliem
Branch/Commit:
b6bef4b
Reviewer: Markus Wageringel
Issue created by migration from https://trac.sagemath.org/ticket/29975
The text was updated successfully, but these errors were encountered: