Open mdhaber opened 2 weeks ago
Thanks. Let's add that when SPEC7 merges and SciPy approves. I think it's better if we don't push changes to that code; showing that only the test has been strengthened.
The third commit changes uses of "array" -> "array_like" in documentation to address https://github.com/scipy/scipy/pull/20834#pullrequestreview-2175097036.
The first commit addresses the first round of comments:
iv_policy
tovalidation_policy
per reviewer preferenceoo
in favor ofinf
per reviewer preferenceThe second commit is the response to the concerns about the
rng
attribute.Unfortunately, I think all the fuss was for nothing. I mis-remembered how things were working, and the current behavior is as we discussed it should be during the meeting on Wednesday at 11 a.m.: unless provided, a new
Generator
is instantiated every time it is needed. The implications for aContinuousDistribution
object are very straightforward:ContinuousDistribution
object is nondeterministic, and any copies are entirely independent.ContinuousDistribution
object is deterministic, and the behavior of any copies will be identical to that of the original.Let me know if I should include that text in the docstring.
I expanded a test to check this behavior.
Note that I never allowed
int
s to be passed forrng
because the argument is calledrng
, notseed
. So if a user accesses the attributerng
, they either get aGenerator
if one was provided orNone
otherwise; they would never get an integer.@tupui @steppi @ev-br @tirthasheshpatel @chrisb83 @dschmitz89