Opened 11 years ago
Closed 6 years ago
#10122 closed defect (duplicate)
Random doctests in random_matrix helpers
Reported by: | jason | Owned by: | jason, was |
---|---|---|---|
Priority: | minor | Milestone: | sage-duplicate/invalid/wontfix |
Component: | linear algebra | Keywords: | |
Cc: | rbeezer, bwonderly | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Change History (7)
comment:1 follow-up: ↓ 2 Changed 10 years ago by
- Cc bwonderly added
comment:2 in reply to: ↑ 1 Changed 10 years ago by
Replying to rbeezer:
Hi Jason,
The randomness comes from the distributions in the GSL library. You can set the seed, on a per-distribution basis, at the time you initialize the distribution.
We could not see a way to do this in a doctest, but outside the routine being tested. So we *definitely* tried to do this, and *probably* couldn't find a way.
I see that GSL is not one of the libraries interfaced in misc/randstate.pyx. At first glance, that would be the way to fix it (add GSL to one of the supported library seed-setting routines in that file).
I see that it's a more complicated issue though. Thanks for the explanation.
comment:3 Changed 10 years ago by
I would have liked to have not marked these tests "random," so thanks for the confirmation that we didn't miss something.
It'd be nice to get all the randomness under one roof, and have things like this use the doctesting seed-setting. So I think it is worth leaving this ticket around (or make a new one that is more general and explicit). Which route do you think would be best?
Rob
comment:4 Changed 8 years ago by
comment:5 Changed 6 years ago by
- Milestone set to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
#15887 removed a bunch of random comments.
comment:6 Changed 6 years ago by
- Status changed from needs_review to positive_review
comment:7 Changed 6 years ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
Hi Jason,
The randomness comes from the distributions in the GSL library. You can set the seed, on a per-distribution basis, at the time you initialize the distribution.
We could not see a way to do this in a doctest, but outside the routine being tested. So we *definitely* tried to do this, and *probably* couldn't find a way.
Any thoughts?
Rob