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.4.2-0-cp314-cp314-win_amd64.whl (355.5 kB view details)

Uploaded CPython 3.14Windows x86-64

mkl_random-1.4.2-0-cp314-cp314-manylinux_2_28_x86_64.whl (452.4 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

mkl_random-1.4.2-0-cp313-cp313-win_amd64.whl (356.3 kB view details)

Uploaded CPython 3.13Windows x86-64

mkl_random-1.4.2-0-cp313-cp313-manylinux_2_28_x86_64.whl (451.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

mkl_random-1.4.2-0-cp312-cp312-win_amd64.whl (354.6 kB view details)

Uploaded CPython 3.12Windows x86-64

mkl_random-1.4.2-0-cp312-cp312-manylinux_2_28_x86_64.whl (450.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

mkl_random-1.4.2-0-cp311-cp311-win_amd64.whl (374.4 kB view details)

Uploaded CPython 3.11Windows x86-64

mkl_random-1.4.2-0-cp311-cp311-manylinux_2_28_x86_64.whl (458.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

mkl_random-1.4.2-0-cp310-cp310-win_amd64.whl (374.0 kB view details)

Uploaded CPython 3.10Windows x86-64

mkl_random-1.4.2-0-cp310-cp310-manylinux_2_28_x86_64.whl (458.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 eb6d0d1a2476ef90b3496c86f1f5ed3ca5136c081989f346831b56838acdf082
MD5 28bfad0e876d7ec4b1c1429c7939d607
BLAKE2b-256 241a7efcdb4d1ab8f27f0d3e42cade501df39a2c9f5f5ab20335792e5e381f63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e867c11d6d9171efb7c84cbb8dc9fcaabaf8a48fb08d5c230938a1e0d45f1134
MD5 28016ba658bff2bb65b429903fb731f3
BLAKE2b-256 db24a8e83921e6b497229b8afc6e6c80374aa8b75e50f5495f56a04fc75271f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7c2ccb9d8078de6c85a191572b10f359579f292007761ac848e7b08c07cc3475
MD5 98d0831d6f57b12f0ac7a212eb8a24ab
BLAKE2b-256 f0e510fa7fd1dcf3f900bb9a05c86c43fed7b4955410a0effb9c9ac23af718a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 61d538b4961d47eefcaae09c6eda7cf948f5d4c3a566709f19b9675c84c998d0
MD5 92834cbe2d0e0a89e422f1ad3af26683
BLAKE2b-256 e549bcf52fa8dd8c20ff2e853986813f368951bea05a726ad778ee3390fdac2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d320765be8089b4237f88bee8eb5eccf4143fe8c08b38a422cae0e396a8d7ba0
MD5 8de2c27484f73384e87013787aa4b9d3
BLAKE2b-256 4233eaefb0135cd73ca97e7291c58bb107bd09f476a6db853081475f77697bcb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a578820e4d4e93c4fc0f10065fc9871de767106a8245569d7cf437e78ee7cbb4
MD5 b1b9e554bd39c16881371007dd444d5d
BLAKE2b-256 e77df5e6f6728c4c755d177565d99b20febb2ba994e7ea51f992f39cedb1ad9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b08e9ca5e8537cead79636c6d854059e594548a06d1d9850089a0d835f71b139
MD5 67eb3ddaa84fbb6b7c5dc3bed2ed5865
BLAKE2b-256 4e98880674996bab4f8f7e8d0a087404811b38b402fc84b3772fa65e9114ec6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2936c97568390480efa55c30557ae710de8c4a5aea64a2e797f3b7dbcbcad1df
MD5 0aad528c31fffe39e3bc0486ae2cb6bb
BLAKE2b-256 4560cce4ed2fcda60be5be702eb7ba8a2ab6476f082529212ac86172792cbffa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b15afc96a62c75ddb7f0bca0b4a17f9823576fdbe30e2a96b550f2ec0b193fb7
MD5 3ff042ff054974041a54326fbee4aea6
BLAKE2b-256 6817be6365eeacabcb9e77823ea4746535103c1a55707d49d3e69509a53597e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.4.2-0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 835958ae45ba8d90b39e91bbe06e2b05f8fd777525a198ae1325d59675d230d6
MD5 3fb6207daf2239e7ed81943cf3ca7a3c
BLAKE2b-256 8fd55c454ced273ef33707fbf1813594904ac3623747fbbf68bdaad359f20ad1

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