Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
NumPy-based Python interface to Intel (R) MKL Random Number Generation functionality
mkl_random
-- a NumPy-based Python interface to Intel (R) MKL Random Number Generation functionalitymkl_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:
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 (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:
FAQs
NumPy-based Python interface to Intel (R) MKL Random Number Generation functionality
We found that mkl-random demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.