mdhaber / scipy

Scipy library main repository
http://scipy.org/scipylib/
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

MAINT: `stats.ContinuousDistribution`: adjustments per review #112

Open mdhaber opened 2 weeks ago

mdhaber commented 2 weeks ago

The first commit addresses the first round of comments:

The 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 a ContinuousDistribution object are very straightforward:

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 ints to be passed for rng because the argument is called rng, not seed. So if a user accesses the attribute rng, they either get a Generator if one was provided or None otherwise; they would never get an integer.

@tupui @steppi @ev-br @tirthasheshpatel @chrisb83 @dschmitz89

mdhaber commented 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.

mdhaber commented 4 days ago

The third commit changes uses of "array" -> "array_like" in documentation to address https://github.com/scipy/scipy/pull/20834#pullrequestreview-2175097036.