<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/random/src, branch main</title>
<subtitle>github.com: numpy/numpy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/'/>
<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://91.123.203.49/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>MAINT: replace `NPY_INLINE` with `inline`</title>
<updated>2022-11-25T09:51:14+00:00</updated>
<author>
<name>Ralf Gommers</name>
<email>ralf.gommers@gmail.com</email>
</author>
<published>2022-11-25T09:04:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=3947b1a023a07a55522de65b4d302339bac2bad7'/>
<id>3947b1a023a07a55522de65b4d302339bac2bad7</id>
<content type='text'>
Closes gh-22100
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes gh-22100
</pre>
</div>
</content>
</entry>
<entry>
<title>BLD: add back stdlib.h include in pcg64.h</title>
<updated>2022-09-11T05:22:06+00:00</updated>
<author>
<name>Christoph Reiter</name>
<email>reiter.christoph@gmail.com</email>
</author>
<published>2022-09-11T05:18:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=80c75e370b77296965ed571eb3bd30b316d2efd8'/>
<id>80c75e370b77296965ed571eb3bd30b316d2efd8</id>
<content type='text'>
This seems to have been removed by accident in #21887
stdlib.h is required for _rotr64() further down.

Fixes:
  error: call to undeclared function '_rotr64'; ISO C99 and later do not support
  implicit function declarations [-Wimplicit-function-declaration]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This seems to have been removed by accident in #21887
stdlib.h is required for _rotr64() further down.

Fixes:
  error: call to undeclared function '_rotr64'; ISO C99 and later do not support
  implicit function declarations [-Wimplicit-function-declaration]
</pre>
</div>
</content>
</entry>
<entry>
<title>DEP: drop support for msvc&lt;=1900 and Interix (#22139)</title>
<updated>2022-08-19T19:12:50+00:00</updated>
<author>
<name>Matti Picus</name>
<email>matti.picus@gmail.com</email>
</author>
<published>2022-08-19T19:12:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=17d730ae32f5f60c9c2ca75d202b4e866debd686'/>
<id>17d730ae32f5f60c9c2ca75d202b4e866debd686</id>
<content type='text'>
[ci skip]

Co-authored-by: h-vetinari &lt;h.vetinari@gmx.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ci skip]

Co-authored-by: h-vetinari &lt;h.vetinari@gmx.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Allow GCC compile on mingw-w64-based systems</title>
<updated>2022-06-29T22:20:23+00:00</updated>
<author>
<name>Matthew Brett</name>
<email>matthew.brett@gmail.com</email>
</author>
<published>2022-06-29T22:15:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=467be385f57cfdf373ba076836054fee3a8218ca'/>
<id>467be385f57cfdf373ba076836054fee3a8218ca</id>
<content type='text'>
Macro `__MINGW32__` always defined for Mingw-w64 compilers (32- or
64-bit):

https://sourceforge.net/p/predef/wiki/Compilers/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Macro `__MINGW32__` always defined for Mingw-w64 compilers (32- or
64-bit):

https://sourceforge.net/p/predef/wiki/Compilers/
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Get full precision for 32 bit floating point random values.</title>
<updated>2021-11-06T07:20:51+00:00</updated>
<author>
<name>warren</name>
<email>warren.weckesser@gmail.com</email>
</author>
<published>2021-11-06T06:59:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=4b9e56921e6343b980b27e308534ca433a4a1fe8'/>
<id>4b9e56921e6343b980b27e308534ca433a4a1fe8</id>
<content type='text'>
The formula to convert a 32 bit random integer to a random float32,

    (next_uint32(bitgen_state) &gt;&gt; 9) * (1.0f / 8388608.0f)

shifts by one bit too many, resulting in uniform float32 samples always
having a 0 in the least significant bit. The formula is corrected to

    (next_uint32(bitgen_state) &gt;&gt; 8) * (1.0f / 16777216.0f)

Occurrences of the incorrect formula in numpy/random/tests/test_direct.py
were also corrected.

Closes gh-17478.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The formula to convert a 32 bit random integer to a random float32,

    (next_uint32(bitgen_state) &gt;&gt; 9) * (1.0f / 8388608.0f)

shifts by one bit too many, resulting in uniform float32 samples always
having a 0 in the least significant bit. The formula is corrected to

    (next_uint32(bitgen_state) &gt;&gt; 8) * (1.0f / 16777216.0f)

Occurrences of the incorrect formula in numpy/random/tests/test_direct.py
were also corrected.

Closes gh-17478.
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Correct incorrect advance in PCG with emulated int128</title>
<updated>2021-10-06T22:23:14+00:00</updated>
<author>
<name>Kevin Sheppard</name>
<email>kevin.k.sheppard@gmail.com</email>
</author>
<published>2021-10-06T08:45:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=401b26e880117ae5bc72b84a7fd267e999f99aa1'/>
<id>401b26e880117ae5bc72b84a7fd267e999f99aa1</id>
<content type='text'>
Correct incorrect implemetation of carry in PCG64 and PCG64DXSM
when advancing more than 2**64 steps

closes #20048
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Correct incorrect implemetation of carry in PCG64 and PCG64DXSM
when advancing more than 2**64 steps

closes #20048
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: Fix typos in the random and f2py documentation. (#20004)</title>
<updated>2021-10-01T08:51:27+00:00</updated>
<author>
<name>MalikIdreesHasanKhan</name>
<email>77000356+MalikIdreesHasanKhan@users.noreply.github.com</email>
</author>
<published>2021-10-01T08:51:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=c4b0b9d898ff958dcaa422e9fc6d554eafb284d5'/>
<id>c4b0b9d898ff958dcaa422e9fc6d554eafb284d5</id>
<content type='text'>
* Fix typos</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix typos</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: random: Use expm1 where appropriate.</title>
<updated>2021-09-23T11:01:41+00:00</updated>
<author>
<name>warren</name>
<email>warren.weckesser@gmail.com</email>
</author>
<published>2021-09-23T11:01:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=d1ed2c2b1eecac38cc31a9cc2ad15c86fd520137'/>
<id>d1ed2c2b1eecac38cc31a9cc2ad15c86fd520137</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Add support for windows on arm targets (#19513)</title>
<updated>2021-07-27T20:08:31+00:00</updated>
<author>
<name>Niyas Sait</name>
<email>niyas.sait@linaro.org</email>
</author>
<published>2021-07-27T20:08:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=77bc3225e6f4badf83190ec300a0e10e56949644'/>
<id>77bc3225e6f4badf83190ec300a0e10e56949644</id>
<content type='text'>
* add support for windows on arm targets

* Philox: Use  _umulh intrinsic for ARM64 target

* CPU Detection: Refactor to avoid separate pre-processor definition for WoA

* adapt test_dragon4 to avoid using pow (**) to workaround issue in windows C RT for arm64

* Update numpy/core/include/numpy/npy_cpu.h

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;

* add release note for numpy windows/arm64 support

* Update 19513.new_feature.rst

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;
Co-authored-by: Charles Harris &lt;charlesr.harris@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* add support for windows on arm targets

* Philox: Use  _umulh intrinsic for ARM64 target

* CPU Detection: Refactor to avoid separate pre-processor definition for WoA

* adapt test_dragon4 to avoid using pow (**) to workaround issue in windows C RT for arm64

* Update numpy/core/include/numpy/npy_cpu.h

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;

* add release note for numpy windows/arm64 support

* Update 19513.new_feature.rst

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;
Co-authored-by: Charles Harris &lt;charlesr.harris@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
