NumPy-based Python interface to Intel (R) MKL Random Number Generation functionality
Project description
mkl_random
-- a NumPy-based Python interface to Intel (R) MKL Random Number Generation functionality
mkl_random
has started as Intel (R) Distribution for Python optimizations for NumPy.
Per NumPy's community suggestions, voiced in https://github.com/numpy/numpy/pull/8209, it is being released as a stand-alone package.
Prebuilt mkl_random
can be installed into conda environment from Intel's channel on Anaconda cloud:
conda install -c intel mkl_random
To install mkl_random Pypi package please use following command:
python -m pip install --i https://pypi.anaconda.org/intel/simple -extra-index-url https://pypi.org/simple mkl_random
If command above installs NumPy package from the Pypi, please use following command to install Intel optimized NumPy wheel package from Anaconda Cloud:
python -m pip install --i https://pypi.anaconda.org/intel/simple -extra-index-url https://pypi.org/simple mkl_random numpy==<numpy_version>
Where <numpy_version>
should be the latest version from https://anaconda.org/intel/numpy
mkl_random
is not fixed-seed backward compatible drop-in replacement for numpy.random
, meaning that it implements sampling from the same distributions as numpy.random
.
For distributions directly supported in Intel (R) Math Kernel Library (MKL), method
keyword is supported:
mkl_random.standard_normal(size=(10**5, 10**3), method='BoxMuller')
Additionally, mkl_random
exposes different basic random number generation algorithms available in MKL. For example to use SFMT19937
use
mkl_random.RandomState(77777, brng='SFMT19937')
For generator families, such that MT2203
and Wichmann-Hill, a particular member of the family can be chosen by specifying brng=('WH', 3)
, etc.
The list of supported by mkl_random.RandomState
constructor brng
keywords is as follows:
- 'MT19937'
- 'SFMT19937'
- 'WH' or ('WH', id)
- 'MT2203' or ('MT2203', id)
- 'MCG31'
- 'R250'
- 'MRG32K3A'
- 'MCG59'
- 'PHILOX4X32X10'
- 'NONDETERM'
- 'ARS5'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for mkl_random-1.2.4-90-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 314b4cfa40f5c1901a0672c38a27a93f327088e649919c31d87243eb07577cd8 |
|
MD5 | 0283b2867aa960fb9025468dc8a4c396 |
|
BLAKE2b-256 | dc0de9c4e5f857f776fd7c59e1256679d3094a05db39eac2c73d404aefbc3729 |
Hashes for mkl_random-1.2.4-90-cp310-cp310-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78cada0e7b04511ba3d25f02d435953f8a8491f7dbd240396bc7a3cf42ceb766 |
|
MD5 | f9f2b0083219b5924c23e60bebc25213 |
|
BLAKE2b-256 | e73fc6d6feb8442356bd42469fff0e1debe57758a385774b5ee6a2af2c2f4b85 |
Hashes for mkl_random-1.2.4-90-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2007f5d6e9d0bedb52f66602a87cf91841a9e39b1f50f32b9d5495c6ddd0be0 |
|
MD5 | 2c82becb5c072f478739d825d3c0b334 |
|
BLAKE2b-256 | 4f3dd4b073105d880bef92c49b29b6771e9b9063a205f0cb59f468dbbfc53e03 |
Hashes for mkl_random-1.2.4-90-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55830cb95a41f280bbdd59b9a91527b60a7389fc4dca71c9e75b2bbd34925206 |
|
MD5 | ba447a3ff282f141fc0647a9bd3c1293 |
|
BLAKE2b-256 | 2ced6a5d229d306345c93a12b13d8ab986b4fa1490d75ed61e2a60b5f7806482 |