Registry / ai-ml / mkl-random

mkl-random

JSON →
library1.4.1pypypi✓ verified 85d ago

NumPy-based Python interface to Intel (R) MKL Random Number Generation functionality. Provides high-performance random number generation backed by Intel MKL. Current version 1.4.1, supporting Python 3.10-3.14. Release cadence is irregular.

pip install mkl-random
INSTALL
IMPORT
SIG · MKL-RANDOM
M
mkl-random
ai-mlpythonv1.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mkl_random
import mkl_random
from mkl_random import *
Star import discouraged due to namespace overlap with numpy.random
mkl_random.beta
from mkl_random import beta
from numpy.random import beta
numpy.random.beta may not use MKL; explicit import from mkl_random ensures MKL backend

Quickstart: import mkl_random, seed, and generate random samples using the MKL backend.

import mkl_random import os # Set random seed for reproducibility mkl_random.seed(42) # Generate random numbers rng = mkl_random.RandomState(seed=42) samples = rng.rand(10) print(samples)
Debug
Known issues
breakingmkl_random 1.4.0+ drops support for Python <3.10. Upgrade Python to 3.10+ if you were using an older version.
fix
Upgrade Python to 3.10+ and reinstall mkl-random.
affects: 1.4.0+
gotchamkl_random.seed() does not affect numpy.random unless you call numpy.random.seed() separately. They operate independently.
fix
Use mkl_random.seed() for MKL-based generators and numpy.random.seed() for numpy backend if needed.
affects: all
gotchaUsing from mkl_random import * may silently overwrite numpy.random functions because mkl_random exports names like 'normal', 'rand', etc.
fix
Avoid star import; use import mkl_random and then mkl_random.normal(...).
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'mkl_random'
mkl_random is not installed in the current environment.
fix
Run 'pip install mkl-random' or 'conda install -c intel mkl-random'.
ImportError: DLL load failed: The specified module could not be found
Intel MKL runtime (mkl_rt.dll / libmkl_rt.so) is missing from the system or Python path.
fix
Install the Intel MKL library via conda ('conda install mkl') or download from Intel's website. On Linux, set LD_LIBRARY_PATH to MKL library directory.
Upgrade
Version history
1.4.1latest on PyPI · released May 12, 2026
Audit
Dependencies
numpyrequiredRequired for array handling and compatibility with NumPy's random module
mklrequiredIntel MKL runtime library; must be separately installed or provided via conda
Agent activity
18 hits · last 30 days
node
12
Resources
mkl-random — pip install mkl-random · libregistry