Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
* Fixed compatibility with NumPy 2.5 by replacing the deprecated in-place array `shape` assignment with `reshape`, and by replacing the deprecated `numpy.testing.suppress_warnings` usage in tests with `pytest.warns` [gh-137](https://github.com/IntelPython/mkl_random/pull/137)
* Fixed a constant integer overflow in `irk_rand_uint32_vec` by declaring the `shift` variable as `npy_uint32` instead of `npy_int32`, so `2**31` no longer overflows a signed 32-bit integer (behavior is unchanged as all downstream uses rely on modulo-2^32 arithmetic)

## [1.4.1] (05/11/2026)

Expand Down
2 changes: 1 addition & 1 deletion mkl_random/src/mkl_distributions.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -1981,7 +1981,7 @@ void irk_rand_uint32_vec(irk_state *state,

if (hi >= intm) {

npy_int32 shift = ((npy_uint32)intm) + ((npy_uint32)1);
npy_uint32 shift = ((npy_uint32)intm) + ((npy_uint32)1);
int i;

/* if lo is non-zero, shift one more to accommodate possibility of hi
Expand Down
Loading