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.0-0-cp313-cp313-win_amd64.whl (315.6 kB view details)

Uploaded CPython 3.13Windows x86-64

mkl_random-1.3.0-0-cp313-cp313-manylinux_2_28_x86_64.whl (411.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

mkl_random-1.3.0-0-cp312-cp312-win_amd64.whl (313.8 kB view details)

Uploaded CPython 3.12Windows x86-64

mkl_random-1.3.0-0-cp312-cp312-manylinux_2_28_x86_64.whl (410.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

mkl_random-1.3.0-0-cp311-cp311-win_amd64.whl (332.7 kB view details)

Uploaded CPython 3.11Windows x86-64

mkl_random-1.3.0-0-cp311-cp311-manylinux_2_28_x86_64.whl (411.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

mkl_random-1.3.0-0-cp310-cp310-win_amd64.whl (329.9 kB view details)

Uploaded CPython 3.10Windows x86-64

mkl_random-1.3.0-0-cp310-cp310-manylinux_2_28_x86_64.whl (404.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

mkl_random-1.3.0-0-cp39-cp39-win_amd64.whl (330.0 kB view details)

Uploaded CPython 3.9Windows x86-64

mkl_random-1.3.0-0-cp39-cp39-manylinux_2_28_x86_64.whl (404.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

File details

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

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 87af834bb87c852ac1f82145132f4dcd2444bb6063b0fa653712b6d27310ce95
MD5 a5791c8823991cff1b5ac027e6a791e8
BLAKE2b-256 479f7b7598e59dd6a91c12ebc0fe4814157029e16819a83ebca9c440f59b1118

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4e59e94ce44a729f14b414238b4a978a003211ef0861e3312725995038545706
MD5 d00f1c80246abf9d054fb788e5eb2220
BLAKE2b-256 e70dbc570979de0a6998a27c0e003c70af44ba65532e7c2ed632c9158d7839b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8fcf0161259df8cbeacc81f7772d5cef377e394de4917f33e150d35632524cdc
MD5 b7a6e1d84dd2f704d4ef35f0b6fa0b00
BLAKE2b-256 a27243d371b8d617f0029b49810140c1dfd262d5b9e5ab190fab5890eae6e6eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0dbed6605c41cf37eaea438352a922a5cf4dc123fda6e7115cc51c21f547c55c
MD5 e7a9664d708edfad5b53b43ca385dc8a
BLAKE2b-256 b55a9141eb57c48f8f15741d82576517debb939494fe998b45f62226180a0fd5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 91926372bb2625f612a00aedb1b2c17cb23fea7a414f4b0708413e02cf572fcf
MD5 99a9c069d4c34171709420d38737b7cf
BLAKE2b-256 ec1c52c7ef550126ef22f9fa98b5df1579f9557fd327750897562dbfaba2f55b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ccc42e7401be4e508f7af86745e1948a9d693caf37348eb4b0c5264a6ed11d36
MD5 2936523bae9b74f3d9703aed64e23e6d
BLAKE2b-256 9a5aed909e0fa6a2d055d7c507bc0933d33c6ef807b85ddd8cf2a96da3acfa0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5938ac4319d0d5d705d342329d6ac1c58504350a9935393f8249fdd46bb39a12
MD5 5a10023564c4113fc61872e80f67387b
BLAKE2b-256 697d27297f9b63793a18b6fac966b2b78b6b3f1f3f45d7c980e045ddd0d2ec92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 74f3a0ba8a9e19fc2678ecfe68812fc43c7edcf6f2dd8555195691f3f5f24f4f
MD5 70d37b1d56d8535b3b984b905c90244c
BLAKE2b-256 484447960d865dfc3661d764bcc1ea7dd400df0cbe7d956393decd02745681ef

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.0-0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: mkl_random-1.3.0-0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 330.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for mkl_random-1.3.0-0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2b9dabae07c2e04ecb8783c0df698eed6f1ab315609f41e1b2ecf683cb56d724
MD5 1c6f7d6afc1b3de61eb2c3047dadad22
BLAKE2b-256 04c877d0273a61cd430ba0e0d0e4a24639dedbe6a5c299f8da3cb2e2e2346fdc

See more details on using hashes here.

File details

Details for the file mkl_random-1.3.0-0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mkl_random-1.3.0-0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b7e4f5186b431d6f9c9afc7443e1bc2ab0a6ad1f5b27f9665c95ddbea5679f23
MD5 3e77df631315b9da64f6f86193a6c633
BLAKE2b-256 2bf14945e59c4cba06d0ebb302c422cb0825b6f1f51d43ec206eb49dc972da39

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