Skip to content

Implement mkl_random.interfaces and update mkl_random#92

Open
ndgrigorian wants to merge 5 commits intomasterfrom
feature/add-numpy-random-interface
Open

Implement mkl_random.interfaces and update mkl_random#92
ndgrigorian wants to merge 5 commits intomasterfrom
feature/add-numpy-random-interface

Conversation

@ndgrigorian
Copy link
Collaborator

This PR adds mkl_random.interfaces and an interface numpy_random, aligning with the approach in mkl_fft to create drop-in replacements

In adding this, mkl_random main namespace was updated as follows

  • moved implementations of general functionality into a parent helper class _MKLRandomState
  • subclassed with MKLRandomState, which also implements all functionality exclusive to mkl_random (this way, numpy interface does not expose such functionality as multinormal_cholesky)
  • added subclass RandomState which effectively aliases MKLRandomState with a deprecation warning (as it will be removed from the namespace in a later release)
  • updated implementations of get_state, set_state, and multivariate_normal to align with changes in NumPy (especially the addition of keyword arguments in get_state and multivariate_normal)

Slips in changes updating get_state, set_state, and multivariate_normal to align with recent numpy changes
@ndgrigorian ndgrigorian changed the title Implement mkl_random.interfaces and update mk_random Implement mkl_random.interfaces and update mkl_random Feb 25, 2026
now ignore irrelevant RuntimeWarnings and align with the test in NumPy's test suite
cleans up visual indentation and various linter/style mistakes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant