{"id":13686193,"url":"https://github.com/bashtage/randomgen","last_synced_at":"2025-04-06T10:11:00.113Z","repository":{"id":29601159,"uuid":"122181085","full_name":"bashtage/randomgen","owner":"bashtage","description":"Numpy-compatible bit generators and add some random variate distributions missing from NumPy.","archived":false,"fork":false,"pushed_at":"2024-01-05T14:13:01.000Z","size":36904,"stargazers_count":94,"open_issues_count":2,"forks_count":24,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-30T02:22:43.293Z","etag":null,"topics":["aes","aesctr","dsfmt","hc-128","mersenne-twister","numpy","pcg","philox","prng","pseudo-rngs","python","random-number-distributions","random-number-generators","random123","rng","speck-128","stream","threefry","xoroshiro","ziggurat"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bashtage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-02-20T09:59:34.000Z","updated_at":"2024-04-26T22:02:38.000Z","dependencies_parsed_at":"2023-01-14T15:30:16.906Z","dependency_job_id":"45d6f04d-710c-4e64-bb81-85685192b8cb","html_url":"https://github.com/bashtage/randomgen","commit_stats":{"total_commits":570,"total_committers":8,"mean_commits":71.25,"dds":"0.10877192982456141","last_synced_commit":"6e20bd0a3b4022f6406e70b31bfb4f2ca87ef211"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtage%2Frandomgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtage%2Frandomgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtage%2Frandomgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bashtage%2Frandomgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bashtage","download_url":"https://codeload.github.com/bashtage/randomgen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464220,"owners_count":20942970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes","aesctr","dsfmt","hc-128","mersenne-twister","numpy","pcg","philox","prng","pseudo-rngs","python","random-number-distributions","random-number-generators","random123","rng","speck-128","stream","threefry","xoroshiro","ziggurat"],"created_at":"2024-08-02T15:00:22.400Z","updated_at":"2025-04-06T10:11:00.082Z","avatar_url":"https://github.com/bashtage.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# RandomGen\n\nThis package contains additional bit generators for NumPy's\n`Generator` and an `ExtendedGenerator` exposing methods not in `Generator`.\n\n\n**Continuous Integration**\n\n[![Azure Build Status](https://dev.azure.com/kevinksheppard0207/kevinksheppard/_apis/build/status/bashtage.randomgen?branchName=main)](https://dev.azure.com/kevinksheppard0207/kevinksheppard/_build/latest?definitionId=2\u0026branchName=main)\n[![Cirrus CI Build Status](https://api.cirrus-ci.com/github/bashtage/randomgen.svg?branch=main)](https://api.cirrus-ci.com/github/bashtage/randomgen.svg)\n[![Github Workflow Build Status](https://github.com/bashtage/randomgen/actions/workflows/cron-build-and-test.yml/badge.svg)](https://github.com/bashtage/randomgen/actions/workflows/cron-build-and-test.yml)\n\n\n**Coverage**\n\n[![codecov](https://codecov.io/gh/bashtage/randomgen/branch/main/graph/badge.svg)](https://codecov.io/gh/bashtage/randomgen)\n\n**Latest Release**\n\n[![PyPI version](https://badge.fury.io/py/randomgen.svg)](https://pypi.org/project/randomgen/)\n[![Anacnoda Cloud](https://anaconda.org/conda-forge/randomgen/badges/version.svg)](https://anaconda.org/conda-forge/randomgen)\n\n**License**\n\n[![NCSA License](https://img.shields.io/badge/License-NCSA-blue.svg)](https://opensource.org/licenses/NCSA)\n[![BSD License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![DOI](https://zenodo.org/badge/122181085.svg)](https://zenodo.org/badge/latestdoi/122181085)\n\nThis is a library and generic interface for alternative random\ngenerators in Python and NumPy.\n\n## New Features\n\nThe the [development documentation](https://bashtage.github.io/randomgen/change-log.html) for the latest features,\nor the [stable documentation](https://bashtage.github.io/randomgen/devel/change-log.html) for the latest released features.\n\n\n# WARNINGS\n\n## Changes in v1.24\n\n``Generator`` and ``RandomState`` were **removed** in 1.23.0.\n\n## Changes from 1.18 to 1.19\n\n``Generator`` and ``RandomState`` have been officially deprecated in 1.19, and will\nwarn with a ``FutureWarning`` about their removal. They will also receive virtually\nno maintenance. It is now time to move to NumPy's ``np.random.Generator`` which has\nfeatures not in ``randomstate.Generator`` and is maintained more actively.\n\nA few distributions that are not present in ``np.random.Generator`` have been moved\nto ``randomstate.ExtendedGenerator``:\n\n* `multivariate_normal`: which supports broadcasting\n* `uintegers`: fast 32 and 64-bit uniform integers\n* `complex_normal`: scalar complex normals\n\nThere are no plans to remove any of the bit generators, e.g., ``AESCounter``,\n``ThreeFry``, or ``PCG64``. \n\n### Changes from 1.16 to 1.18\nThere are many changes between v1.16.x and v1.18.x. These reflect API\ndecision taken in conjunction with NumPy in preparation of the core\nof `randomgen` being used as the preferred random number generator in\nNumPy. These all issue `DeprecationWarning`s except for `BasicRNG.generator`\nwhich raises `NotImplementedError`. The C-API has also changed to reflect\nthe preferred naming the underlying Pseudo-RNGs, which are now known as\nbit generators (or `BigGenerator`s).\n\n## Future Plans\n\n* Add some distributions that are not supported in NumPy. _Ongoing_\n* Add any interesting bit generators I come across. _Recent additions include the DXSM and CM-DXSM variants of PCG64 and the LXM generator._\n\n## Included Pseudo Random Number Generators\n\nThis module includes a number of alternative random\nnumber generators in addition to the MT19937 that is included in NumPy.\nThe RNGs include:\n\n* Cryptographic cipher-based random number generator based on AES, ChaCha20, HC128 and Speck128.\n* [MT19937](https://github.com/numpy/numpy/blob/main/numpy/random/mtrand/),\n the NumPy rng\n* [dSFMT](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/) a\n  SSE2-aware version of the MT19937 generator that is especially fast at\n  generating doubles\n* [xoroshiro128+](https://prng.di.unimi.it/),\n  [xorshift1024*φ](https://prng.di.unimi.it/),\n  [xoshiro256**](https://prng.di.unimi.it/),\n  and [xoshiro512**](https://prng.di.unimi.it/)\n* [PCG64](https://www.pcg-random.org/)\n* ThreeFry and Philox from [Random123](https://www.deshawresearch.com/resources_random123.html)\n* Other cryptographic-based generators: `AESCounter`, `SPECK128`, `ChaCha`, and `HC128`.\n* Hardware (non-reproducible) random number generator on AMD64 using `RDRAND`.\n* Chaotic PRNGS: Small-Fast Chaotic (`SFC64`) and Jenkin's Small-Fast (`JSF`).\n\n  \n## Status\n\n* Builds and passes all tests on:\n  * Linux 32/64 bit, Python 3.7, 3.8, 3.9, 3.10\n  * Linux (ARM/ARM64), Python 3.8\n  * OSX 64-bit, Python 3.9\n  * Windows 32/64 bit, Python 3.7, 3.8, 3.9, 3.10\n  * FreeBSD 64-bit\n\n## Version\n\nThe package version matches the latest version of NumPy when the package\nis released.\n\n## Documentation\n\nDocumentation for the latest release is available on\n[my GitHub pages](https://bashtage.github.io/randomgen/). Documentation for\nthe latest commit (unreleased) is available under\n[devel](https://bashtage.github.io/randomgen/devel/).\n\n\n## Requirements\nBuilding requires:\n\n* Python (3.9, 3.10, 3.11, 3.12, 3.13)\n* NumPy (1.22.3+, runtime, 2.0.0+, building)\n* Cython (3.0.10+)\n\nTesting requires pytest (7+).\n\n**Note:** it might work with other versions but only tested with these\nversions.\n\n## Development and Testing\n\nAll development has been on 64-bit Linux, and it is regularly tested on\nAzure (Linux-AMD64, Window, and OSX) and Cirrus (FreeBSD and Linux-ARM).\n\nTests are in place for all RNGs. The MT19937 is tested against\nNumPy's implementation for identical results. It also passes NumPy's\ntest suite where still relevant.\n\n## Installing\n\nEither install from PyPi using\n\n```bash\npython -m pip install randomgen\n```\n\nor, if you want the latest version,\n\n```bash\npython -m pip install git+https://github.com/bashtage/randomgen.git\n```\n\nor from a cloned repo,\n\n```bash\npython -m pip install .\n```\n\nIf you use conda, you can install using conda forge\n\n```bash\nconda install -c conda-forge randomgen\n```\n\n### SSE2\n\n`dSFTM` makes use of SSE2 by default.  If you have a very old computer\nor are building on non-x86, you can install using:\n\n```bash\nexport RANDOMGEN_NO_SSE2=1\npython -m pip install . \n```\n\n### Windows\n\nEither use a binary installer, or if building from scratch, use\nPython 3.6/3.7 with Visual Studio 2015 Build Toolx.\n\n## License\n\nDual: BSD 3-Clause and NCSA, plus sub licenses for components.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbashtage%2Frandomgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbashtage%2Frandomgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbashtage%2Frandomgen/lists"}