<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/random/tests, branch main</title>
<subtitle>github.com: numpy/numpy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/'/>
<entry>
<title>MAINT: random: In a test module, don't use a global non-deterministically Generator.</title>
<updated>2023-05-01T17:11:58+00:00</updated>
<author>
<name>warren</name>
<email>warren.weckesser@gmail.com</email>
</author>
<published>2023-05-01T17:11:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=5d51fd9d38ada80cf35c33388d2753af69ba1538'/>
<id>5d51fd9d38ada80cf35c33388d2753af69ba1538</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: random: Don't return negative values from Generator.geometric.</title>
<updated>2023-05-01T03:28:44+00:00</updated>
<author>
<name>warren</name>
<email>warren.weckesser@gmail.com</email>
</author>
<published>2023-04-27T15:52:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=40ae83411b275b68425b5c85a7243c69599edc59'/>
<id>40ae83411b275b68425b5c85a7243c69599edc59</id>
<content type='text'>
In C, when the integer part of a double exceeds the maximum int64, casting
the double to int64_t is undefined behavior.  On some platforms, the result
is 2**64-1 and on others it is -2**64.  That results in rng.geometric()
returning -2**64 when p was sufficiently small on some platforms.

The fix is to never invoke undefined behavior by ensuring we don't attempt
to cast very large double values to int64_t.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In C, when the integer part of a double exceeds the maximum int64, casting
the double to int64_t is undefined behavior.  On some platforms, the result
is 2**64-1 and on others it is -2**64.  That results in rng.geometric()
returning -2**64 when p was sufficiently small on some platforms.

The fix is to never invoke undefined behavior by ensuring we don't attempt
to cast very large double values to int64_t.
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: accept zeros on numpy.random dirichlet function (#23440)</title>
<updated>2023-04-11T07:38:03+00:00</updated>
<author>
<name>Paulo Almeida</name>
<email>pcca24102002@gmail.com</email>
</author>
<published>2023-04-11T07:38:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=fe893743b83173b72648dc79d86eda905230d1e9'/>
<id>fe893743b83173b72648dc79d86eda905230d1e9</id>
<content type='text'>
Changed alpha value error to pass a null value. This way, dirichlet function (on the generator, not mtrand) won't raise a value exception at 0. Also added test.

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changed alpha value error to pass a null value. This way, dirichlet function (on the generator, not mtrand) won't raise a value exception at 0. Also added test.

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #23195 from seberg/public-rng-spawn</title>
<updated>2023-02-23T23:01:17+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2023-02-23T23:01:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=d92cc2d1c7c7153525e03c4d10377714d85cfde6'/>
<id>d92cc2d1c7c7153525e03c4d10377714d85cfde6</id>
<content type='text'>
API: Add `rng.spawn()`, `bit_gen.spawn()`, and `bit_gen.seed_seq`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
API: Add `rng.spawn()`, `bit_gen.spawn()`, and `bit_gen.seed_seq`</pre>
</div>
</content>
</entry>
<entry>
<title>API: Add `rng.spawn()`, `bit_gen.spawn()`, and `bit_gen.seed_seq`</title>
<updated>2023-02-14T19:19:28+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastianb@nvidia.com</email>
</author>
<published>2023-02-10T12:34:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=c1fa0d981258063e00e8976c41d34a6b94b12516'/>
<id>c1fa0d981258063e00e8976c41d34a6b94b12516</id>
<content type='text'>
This makes the seed sequence interface more public facing by:
1. Adding `BitGenerator.seed_seq` to give clear access to `_seed_seq`
2. Add `spawn()` to both the generator and the bit generator as
   convenience methods for spawning new instances.

I somewhat remember that we always meant to consider making this
more public and adding such convenient methods, but did not do
so originally.
So, now, I do wonder whether it is time to make this fully public?

It would be nice to follow up at some point with a bit of best practices.
This also doesn't add it to the `RandomState`, although doing it via
`RandomState._bit_generator` is of course valid.
Can we define as this kind of access as stable enough that downstream
libraries could use it?  I fear that backcompat with `RandomState`
might make adopting newer things like spawning hard for libraries?
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the seed sequence interface more public facing by:
1. Adding `BitGenerator.seed_seq` to give clear access to `_seed_seq`
2. Add `spawn()` to both the generator and the bit generator as
   convenience methods for spawning new instances.

I somewhat remember that we always meant to consider making this
more public and adding such convenient methods, but did not do
so originally.
So, now, I do wonder whether it is time to make this fully public?

It would be nice to follow up at some point with a bit of best practices.
This also doesn't add it to the `RandomState`, although doing it via
`RandomState._bit_generator` is of course valid.
Can we define as this kind of access as stable enough that downstream
libraries could use it?  I fear that backcompat with `RandomState`
might make adopting newer things like spawning hard for libraries?
</pre>
</div>
</content>
</entry>
<entry>
<title>TST: Add a random integers bounds checking test that previously failed</title>
<updated>2023-02-13T10:29:07+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastianb@nvidia.com</email>
</author>
<published>2023-02-13T10:29:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=31faeb8c8fa12f0604a4906410921909034d2c81'/>
<id>31faeb8c8fa12f0604a4906410921909034d2c81</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #22713 from seberg/numba-systemerror</title>
<updated>2022-12-02T20:29:00+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2022-12-02T20:29:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=c4ce4e97fe82755c2fd5c9a5d3b2d3577faf5ce7'/>
<id>c4ce4e97fe82755c2fd5c9a5d3b2d3577faf5ce7</id>
<content type='text'>
TST: Skip when numba/numpy compat issues cause SystemError</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TST: Skip when numba/numpy compat issues cause SystemError</pre>
</div>
</content>
</entry>
<entry>
<title>TST: Skip when numba/numpy compat issues cause SystemError</title>
<updated>2022-12-02T19:28:48+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastian@sipsolutions.net</email>
</author>
<published>2022-12-02T16:18:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=d56c48754ba07b36e0e8561887cbc0c732ff54d0'/>
<id>d56c48754ba07b36e0e8561887cbc0c732ff54d0</id>
<content type='text'>
numba is a bit buggy when wrapping ufuncs, so what should be nothing
is (on non dev versions) a SystemError and not even an ImportError.

So simply catch those too, since it can be a confusing error during
dev otherwise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
numba is a bit buggy when wrapping ufuncs, so what should be nothing
is (on non dev versions) a SystemError and not even an ImportError.

So simply catch those too, since it can be a confusing error during
dev otherwise.
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Move _inspect and _pep440 from compat to _utils</title>
<updated>2022-11-25T13:02:33+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastianb@nvidia.com</email>
</author>
<published>2022-11-25T12:43:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=dab75729662b1335d714a3b5f500ee7f2914a21d'/>
<id>dab75729662b1335d714a3b5f500ee7f2914a21d</id>
<content type='text'>
Note that unfortunately, compat does expose _inspect as well,
so the import remains (just the definition place moves).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note that unfortunately, compat does expose _inspect as well,
so the import remains (just the definition place moves).
</pre>
</div>
</content>
</entry>
<entry>
<title>TST: Skip tests that are not currently supported in wasm</title>
<updated>2022-11-11T10:52:06+00:00</updated>
<author>
<name>Hood Chatham</name>
<email>roberthoodchatham@gmail.com</email>
</author>
<published>2022-11-10T19:54:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=08c6e9c142e619ac5175b6a13342ba2f2c571ddd'/>
<id>08c6e9c142e619ac5175b6a13342ba2f2c571ddd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
