Skip to main content

NumPy-based Python interface to Intel (R) MKL Random Number Generation functionality

Project description

mkl_random -- a NumPy-based Python interface to Intel® oneAPI Math Kernel Library (OneMKL) Random Number Generation functionality

Conda package using conda-forge

mkl_random started as a part of Intel® Distribution for Python optimizations to 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 using:

  conda install -c https://software.repos.intel.com/python/conda mkl_random

or from conda forge channel:

   conda install -c conda-forge mkl_random

To install mkl_random PyPI package please use following command:

   python -m pip install -i https://software.repos.intel.com/python/pypi --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 Intel Pypi Cloud:

   python -m pip install -i https://software.repos.intel.com/python/pypi --extra-index-url https://pypi.org/simple mkl_random numpy==<numpy_version>

Where <numpy_version> should be the latest version from https://software.repos.intel.com/python/conda/


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® OneMKL, 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'

To build mkl_random from sources on Linux:

  • install a recent version of MKL, if necessary;
  • execute source /path_to_oneapi/mkl/latest/env/vars.sh;
  • execute python -m pip install .

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mkl_random-1.3.1-0-cp314-cp314-win_amd64.whl (309.3 kB view details)

Uploaded CPython 3.14Windows x86-64

mkl_random-1.3.1-0-cp314-cp314-manylinux_2_28_x86_64.whl (392.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

mkl_random-1.3.1-0-cp313-cp313-win_amd64.whl (310.5 kB view details)

Uploaded CPython 3.13Windows x86-64

mkl_random-1.3.1-0-cp313-cp313-manylinux_2_28_x86_64.whl (389.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

mkl_random-1.3.1-0-cp312-cp312-win_amd64.whl (309.0 kB view details)

Uploaded CPython 3.12Windows x86-64

mkl_random-1.3.1-0-cp312-cp312-manylinux_2_28_x86_64.whl (389.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

mkl_random-1.3.1-0-cp311-cp311-win_amd64.whl (327.7 kB view details)

Uploaded CPython 3.11Windows x86-64

mkl_random-1.3.1-0-cp311-cp311-manylinux_2_28_x86_64.whl (396.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

mkl_random-1.3.1-0-cp310-cp310-win_amd64.whl (327.4 kB view details)

Uploaded CPython 3.10Windows x86-64

mkl_random-1.3.1-0-cp310-cp310-manylinux_2_28_x86_64.whl (395.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

Details for the file mkl_random-1.3.1-0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 d3b7d77c34157aeca455762d5bf7f488525901eaac7b06581c5ea75ac57c4828
MD5 853725f1c0264f3890d9da006d012200
BLAKE2b-256 e1f1290c54153228dc0c9580d7fdb6f986a47405206eaea90052cfecc9215c4d

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4349ea41d733a53841617a12a18ad11df9310104c77d75b8129bb32d806a7e2b
MD5 cbe12b7637b231d9f63003634777b8ab
BLAKE2b-256 42e2756dbfd72771889c5522bc5bdfcbe88906fd053709ff85204cdbd450bed3

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 46bb649171bf78d4f884f5375648345c65af0cf8ae86a2d3b2c24c0f30607765
MD5 b931d4de042b0572eb0daa4a8c216960
BLAKE2b-256 aa8aebd3db8b401c7abeedbde3b32d0eb8445a23d6896669c32d92a2baa9244a

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8cb087db1eee8d00eebda6f8feeb47d1e58310bec0afcc82585bedd5fb412d40
MD5 00649d441c92f3c40ed8ff56e10387b8
BLAKE2b-256 fba6f2292606c5f4e4ab2a80478d58854e2d4815a2f8024e20c7ef4ed35f6242

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 64771fda8448ef8214835e648e15c9fa8f8343de393308fb1fdb7b427a905b56
MD5 b5f1216aa60f2b09bf497b82386bfe59
BLAKE2b-256 bb1bf38f913e44b67b6a48d7d4bdc18989a1bf4a57afb13b93f7362b04e3ba04

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e479b9e24f55fa711a1e2b692fa4df4d392731a95adc72827d0064c66da95bd6
MD5 922cb13b81bff0363f69e571e1851dd7
BLAKE2b-256 f6bf9a676399bdf0bb9fd707e6883e707a180a9f554a1625c549d113e4dc17f6

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a7b0c17aaa297d24fcd863a3b753b52b1329314cef444299f60713aa2eff33db
MD5 a3efbeb707f31c6248d1b400409265eb
BLAKE2b-256 1707f2505adbc4929cfde28dcc529cf8e984774b25c4818a0528e28a19386a32

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5ec5ea3e4aaaa9a2cdd8497392c035071c9a73f4025f8efb44a2187409bb113b
MD5 568439af566678cecb0bbebbfea19311
BLAKE2b-256 e0eaafc591229ce938e0d5ad4b55e2ef33e7ecf571bc6d9bb2bfe61d40a2f5ee

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7c461156cac3b3a9275f39e4e9509943302d85457ea77c8ca4f8dcd3bb56f51f
MD5 1f0278492494d206d09ff105e4bf4fea
BLAKE2b-256 1f84b4354c3fef78e88bb1f0a743b9f85ab07988a7334a72a95694fca44a2a89

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.1-0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.1-0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0f7c4119a81b907d0e7a16fed0998544cfce5faa176c08d704938b07d23073e5
MD5 b8c8d3da6ccbdb5d3ba7f760e69e67e9
BLAKE2b-256 18fbd79787e258df55ce74400c2d23a73d36b75f6473615f36c920de674f4a0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page