diff options
author | mattip <matti.picus@gmail.com> | 2019-05-23 07:58:47 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-05-23 08:22:13 +0300 |
commit | 19b48e2c655c966ff96070c14e9b51c38b35f708 (patch) | |
tree | ea82b8308fcfa588e28523a587dc4dddc2ee23fc /numpy/random/tests/test_direct.py | |
parent | 4e6a812732b4c09b20354a47d488fbe384124827 (diff) | |
download | numpy-19b48e2c655c966ff96070c14e9b51c38b35f708.tar.gz |
BUG: test, fix missing return to deprecated function
Diffstat (limited to 'numpy/random/tests/test_direct.py')
-rw-r--r-- | numpy/random/tests/test_direct.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/random/tests/test_direct.py b/numpy/random/tests/test_direct.py index ca6dbb58d..5ae71ade7 100644 --- a/numpy/random/tests/test_direct.py +++ b/numpy/random/tests/test_direct.py @@ -4,7 +4,7 @@ from os.path import join import numpy as np from numpy.testing import (assert_equal, assert_allclose, assert_array_equal, - assert_raises) + assert_raises, assert_warns) import pytest from numpy.random import (Generator, MT19937, DSFMT, ThreeFry, @@ -191,6 +191,13 @@ class Base(object): assert_allclose(uniforms, vals) assert_equal(uniforms.dtype, np.float64) + rs = Generator(self.bit_generator(*self.data2['seed'])) + vals = uniform_from_uint(self.data2['data'], self.bits) + with assert_warns(RuntimeWarning): + uniforms = rs.random_sample(len(vals)) + assert_allclose(uniforms, vals) + assert_equal(uniforms.dtype, np.float64) + def test_uniform_float(self): rs = Generator(self.bit_generator(*self.data1['seed'])) vals = uniform32_from_uint(self.data1['data'], self.bits) |