Repository navigation
The version number follows NumPy's, so there is no 2.4.0.
Warning
Some streams differ from 2.3.0 for the same seed and calls, mostly because output that was wrong has been fixed. See the change log before upgrading code that must reproduce earlier results.
Version 2.5.1
- Version 2.5.1 only adds Windows on ARM64 support to the substantial 2.5.0 release.
New features in 2.5.0
- MWCX generators:
MWC192X,MWC128X,MWC128X32andMWC64X32, Vigna's scrambled multiply-with-carry generators. Theiradvanceandjumpedare fast and can also move backward. - Free-threaded Python: importing randomgen does not re-enable the GIL, and one bit generator can be shared between threads. Wheels are built for 3.14t and 3.15t.
- Per-instance SIMD switches:
use_aesni,use_avx2,use_simdanduse_sse41now apply to one instance instead of the whole process. advance_step(max_draws)forPCG64,PCG64DXSM,LCG128MixandPCG32returns an odd step for splitting one stream into streams that do not overlap.
Other important changes in 2.5.0
- Stream changes:
- PCG
jumpednow uses an odd step based on the golden ratio.PCG64(numpy_seed=True)andPCG64DXSMnow match NumPy. - Philox and ThreeFry
advancenow default tocounter=False. - Fixes to Philox and ThreeFry
advance,wishart,SFC64.weyl_incrementsandrandom_raw.
- PCG
- Stricter validation: an unknown
method, or setting a state with another configuration or with values out of range, now raisesValueError. - Removed: the in-place
jumpmethod,BitGenerator.generatorandrandomgen.legacy. - Requirements: Python 3.10+ and NumPy 1.26+ (but not 2.4.0). Building needs Cython 3.1+.
- No AVX2 crash: extensions are no longer all compiled with AVX2, so importing randomgen no longer crashes on x86-64 CPUs without it.
- Development: the development dependencies are now dependency groups (
pip install --group dev), and all tool configuration is inpyproject.toml.