Skip to content

Releases: IntelPython/mkl_random

1.4.0

04 May 22:43
ecc4e3c

Choose a tag to compare

Overview

This release introduces NumPy compatibility through a new patching system and dedicated interface module. mkl_random can now seamlessly replace NumPy's random number generation while maintaining full API compatibility. The release includes extensive test coverage from NumPy's test suite, numerous bug fixes, and improvements to align with modern NumPy behavior. Python 3.9 support has been dropped.

Highlights

🔄 NumPy Patching System

  • New context manager and explicit patch/restore functions to replace numpy.random with mkl_random implementations
  • Query patching status with is_patched() function
  • Seamless drop-in replacement for NumPy's random number generation

🎯 Strict NumPy API Interface

  • New mkl_random.interfaces.numpy_random module provides pure NumPy-compatible API
  • Aliases mkl_random functionality while dropping non-standard arguments and functions
  • Better alignment with NumPy's API contracts

Enhanced Test Coverage

  • Third-party tests from numpy.random integrated to validate compatibility
  • Additional vendored NumPy tests for comprehensive validation
  • Improved reliability and correctness

🐛 Bug Fixes & Improvements

  • Fixed hang in zipf when called with np.nan
  • Fixed size-1 1D arrays being incorrectly cast to scalars
  • Multiple implementation updates to align with newer NumPy versions

📦 Flexible Build Configuration

  • Conda recipe now supports configurable NumPy dependency via USE_NUMPY_BASE environment variable

⚠️ Breaking Changes

  • Python 3.9 support dropped - Minimum supported version is now Python 3.10+
  • mkl_random.RandomState deprecated - Use mkl_random.MKLRandomState instead. RandomState now delegates to the numpy_random interface for compatibility.

Python Version Support

  • ✅ Python 3.10, 3.11, 3.12, 3.13, 3.14
  • ❌ Python 3.9 and earlier

Detailed Changes

Added

  • Added mkl_random patching for NumPy, with mkl_random context manager, is_patched query, and patch_numpy_random and restore_numpy_random calls to replace numpy.random calls with calls from mkl_random.interfaces.numpy_random gh-90

  • Added mkl_random.interfaces with mkl_random.interfaces.numpy_random interface, which aliases mkl_random functionality to more strictly adhere to NumPy's API (i.e., drops arguments and functions which are not part of standard NumPy) gh-92

  • Added third-party tests from numpy.random which tests the mkl_random.interfaces.numpy_random interface gh-103

Changed

  • Updates to mkl_random implementations to better align with newer versions of numpy.random gh-103, gh-115
  • Made conda recipe dependency on numpy configurable through USE_NUMPY_BASE environment variable gh-105

Fixed

  • Various bugfixes including a hang in zipf when called with np.nan and size-1 1D arrays being cast to scalars gh-103, gh-115

Removed

  • Dropped support for Python 3.9 gh-81

Deprecated

  • Deprecated mkl_random.RandomState in favor of mkl_random.MKLRandomState, delegating mkl_random.RandomState to the mkl_random.interfaces.numpy_random interface gh-92

Contributors

New Contributors

Full Changelog: v1.3.1...v1.4.0

1.3.1

17 Dec 03:51
7573490

Choose a tag to compare

This release is identical to 2.1.1 in terms of features

This release only changes conda recipes and package metadata to release the mkl_random package with Python 3.14.

Added

  • Enabled support of Python 3.14 gh-79

v1.3.0

06 Oct 18:51
851daa2

Choose a tag to compare

What's Changed

  • Used GIT_DESCRIBE_TAG and GIT_DESCRIBE_NUMBER in meta.yaml instead of manual stepping the numbers gh-75
  • Extended conda build scripts with the use of WHEELS_OUTPUT_FOLDER variable to build wheel packages gh-74
  • Updated meta.yaml to have a run dependency on numpy-base package gh-73

Contributors

Full Changelog: v1.2.11...1.3.0

v1.2.10

09 Apr 21:20
9cab66c

Choose a tag to compare

This release

  • Adds support for mkl_random out-of-the-box from virtual environment on Windows

v1.2.8

12 Oct 00:48
0df7d04

Choose a tag to compare

Incremental bug fix release: updated installation instructions, reverted work-around for a problem in MKL 2024.2.0

v1.2.7

05 Aug 11:22
e1ed130

Choose a tag to compare

This release addresses technical debt, and fixes the project to work with NumPy 2.0 on both Windows and Linux.

  • Removed use of vendored numpy.pxd, replaced with recommended cimport numpy. This resolved the warning of changes struct size for Cython class broadcast.
  • Fixed warnings from clang compiler
  • Corrected data types for allocation made in Cython which were responsible for test failures with NumPy 2.0 on Windows.

v1.2.6

28 May 14:02
3b45998

Choose a tag to compare

v1.2.6 Pre-release
Pre-release

This is a bug fix release updates mkl_random to support NumPy 2.0

v1.2.5

14 Feb 14:44
d02f447

Choose a tag to compare

Transition testing suite to pytest to enable support for Python 3.12

v1.2.4

14 Sep 23:18

Choose a tag to compare

Change to fix build on mkl_random with clang with new build system introduced in v1.2.3.

v1.2.3

05 Sep 13:36

Choose a tag to compare

  • Modified example of parallel Monte-Carlo work to correctly work on Windows. (gh-26)
  • Transitioned away from using numpy.distutils as it went away in NumPy 1.25 (gh-24)