Randomgen

Latest version: v2.1.1

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

2.1.1

This is a feature, bug fix, and code clean-up release. This release adds two new bit generators, Tyche and Squares.

- Fix a small packaging error in 2.1.0 that skipped two files used in tests
- Added the `Tyche` PRNG of Neves and Araujo. Supports two variants. One is the original implementation in the 2012 paper. The second implementation matches the version in `OpenRand`.
- Added the `Squares` PRNG of Widynski. Supports two variants. The default uses 5 rounds of the middle square algorithm and outputs a 64-bit value. If `variant=32`, then 4 rounds are used but only 32 bits returned.
- Added the helper function `squares.generate_keys` for `Squares`. This function can be used to pre-generate keys for use with `Squares`.
- Fixed a bug in `LCG128Mix` that resulted in `inc` not being correctly set when initialized without a user-provided `inc`.
- Refactored the broadcasting helper functions out of `randomgen.common` to `randomgen.broadcast`. Tests have been added and some edge case bugs have been found and fixed.
- Improve test coverage.
- Additional code clean-up.

2.1.0

This is a feature, bug fix, and code clean-up release. This release adds two new bit generators, Tyche and Squares.

- Added the `Tyche` PRNG of Neves and Araujo. Supports two variants. One is the original implementation in the 2012 paper. The second implementation matches the version in `OpenRand`.
- Added the `Squares` PRNG of Widynski. Supports two variants. The default uses 5 rounds of the middle square algorithm and outputs a 64-bit value. If `variant=32`, then 4 rounds are used but only 32 bits returned.
- Added the helper function `squares.generate_keys` for `Squares`. This function can be used to pre-generate keys for use with `Squares`.
- Fixed a bug in `LCG128Mix` that resulted in `inc` not being correctly set when initialized without a user-provided `inc`.
- Refactored the broadcasting helper functions out of `randomgen.common` to `randomgen.broadcast`. Tests have been added and some edge case bugs have been found and fixed.
- Improve test coverage.
- Additional code clean-up.

2.0.1

The release fixes a packaging issue that resulted in an excessively large source distribution. There are no changes from 2.0.0 other than the reduced sdist size on PyPI.

2.0.0

The randomgen devs are please to announce the release of randomgen 2.0.0.

The key changes in this release:

- Final compatibility with NumPy 2
- Minimum NumPy is now 1.22.3.
- Removed ``"legacy"`` seeding in favor of using `numpy.random.SeedSequence`.
- Removed the vendored copy of ``SeedSequence``.
- Deprecated using the ``mode`` keyword argument to set the seed mode, since only ``SeedSequences`` are supported.
- Changed ``randomgen.common.BitGenerator`` to inherit from ``numpy.random.BitGenerator`` so that
numpy will recognize these as ``BitGenerators``.
- Removed C distribution functions that are available in NumPy (see libnpyrandom)`.
- General code cleanup and modernization.

1.26.1

This is a compatibility release.

* Support for Cython 3
* Initial support for NumPy 2

1.26.0

* Fixed a bug that affected the `jumped` method of `Xoroshiro128` where the `**` version was swapped with the standard version.
* Fixed a bug where `SeedSequence` was not copied when advancing generators using jumped.
* Small compatibility fixes for change in NumPy.
* Changes the documentation theme to sphinx-immaterial.
* Added builds for Python 3.11.
* Increased the minimum Python to 3.8.

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.