Implementation of mlx.random.multivariate_normal (#502) (#877)

* Implementation of mlx.random.multivariate_normal (#502)

* Update python/src/random.cpp

Co-authored-by: Awni Hannun <[email protected]>

* Update python/src/random.cpp

Co-authored-by: Awni Hannun <[email protected]>

* Update python/src/random.cpp

Co-authored-by: Awni Hannun <[email protected]>

* Updated typo in docstring

* Restricted multivariate_normal to  float32

* Generic mean and variance shapes

* Review edits

* Update mlx/random.cpp

Co-authored-by: Awni Hannun <[email protected]>

* Update python/src/random.cpp

Co-authored-by: Awni Hannun <[email protected]>

* Update python/src/random.cpp

Co-authored-by: Awni Hannun <[email protected]>

* Update python/src/random.cpp

Co-authored-by: Awni Hannun <[email protected]>

* Test for ndim of mean and cov

* nits

* smaller size for test

* fix broadcasted sampling

---------

Co-authored-by: Awni Hannun <[email protected]>
Co-authored-by: Awni Hannun <[email protected]>
This commit is contained in:
Luca Arnaboldi
2024-04-09 13:50:12 -07:00
committed by GitHub
co-authored by Awni Hannun Awni Hannun
parent a1a31eed27
commit fffe072028
6 changed files with 270 additions and 1 deletions
+1
View File
@@ -38,6 +38,7 @@ we use a splittable version of Threefry, which is a counter-based PRNG.
gumbel
key
normal
multivariate_normal
randint
seed
split