Skip to content
Merged
Prev Previous commit
Add test for vonmises random array
Include test for vonmises random array. This is another one where the CPython
algorithm is used instead of the NumPy one.
  • Loading branch information
apmasell committed Aug 4, 2022
commit f5c5b8f74c7ffdf8d98c7a282d5443ac9e5d0c02
1 change: 0 additions & 1 deletion numba/cpython/randomimpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,6 @@ def _impl(n, p):
np_prod = n * p
bound = min(n, np_prod + 10.0 * math.sqrt(np_prod * q + 1))

finished = False
total = 0
while niters > 0:
X = 0
Expand Down
3 changes: 3 additions & 0 deletions numba/tests/test_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,9 @@ def test_numpy_uniform(self):
def test_numpy_wald(self):
self._check_array_dist("wald", (0.1, 0.4))

def test_numpy_vonmises(self):
self._check_array_dist_self("vonmises", (0.5, 2.5))

def test_numpy_zipf(self):
self._check_array_dist("zipf", (2.5,))

Expand Down