summaryrefslogtreecommitdiff
path: root/numpy/random/tests
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-05-23 10:24:05 +0300
committermattip <matti.picus@gmail.com>2019-05-23 10:24:05 +0300
commitcdb2b0febd5e287c56b021bb1f55b21d62d618f4 (patch)
treec5855b94af158c78d05900f64a993c765710cc31 /numpy/random/tests
parent19b48e2c655c966ff96070c14e9b51c38b35f708 (diff)
downloadnumpy-cdb2b0febd5e287c56b021bb1f55b21d62d618f4.tar.gz
MAINT: remove tomaxint, random_sample from generator
Diffstat (limited to 'numpy/random/tests')
-rw-r--r--numpy/random/tests/test_direct.py7
-rw-r--r--numpy/random/tests/test_generator_mt19937.py6
-rw-r--r--numpy/random/tests/test_smoke.py15
3 files changed, 0 insertions, 28 deletions
diff --git a/numpy/random/tests/test_direct.py b/numpy/random/tests/test_direct.py
index 5ae71ade7..4700bb0ce 100644
--- a/numpy/random/tests/test_direct.py
+++ b/numpy/random/tests/test_direct.py
@@ -191,13 +191,6 @@ 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)
diff --git a/numpy/random/tests/test_generator_mt19937.py b/numpy/random/tests/test_generator_mt19937.py
index 770c32a39..c20fc5b74 100644
--- a/numpy/random/tests/test_generator_mt19937.py
+++ b/numpy/random/tests/test_generator_mt19937.py
@@ -114,12 +114,6 @@ class TestSetState(object):
self.state['state']['key'],
self.state['state']['pos'])
- def test_basic(self):
- old = self.rg.tomaxint(16)
- self.bit_generator.state = self.state
- new = self.rg.tomaxint(16)
- assert_(np.all(old == new))
-
def test_gaussian_reset(self):
# Make sure the cached every-other-Gaussian is reset.
old = self.rg.standard_normal(size=3)
diff --git a/numpy/random/tests/test_smoke.py b/numpy/random/tests/test_smoke.py
index ca5fde500..d5a0c38a5 100644
--- a/numpy/random/tests/test_smoke.py
+++ b/numpy/random/tests/test_smoke.py
@@ -280,21 +280,6 @@ class RNG(object):
permuted = self.rg.permutation(original)
assert_((original != permuted).any())
- def test_tomaxint(self):
- vals = self.rg.tomaxint(size=100000)
- maxsize = 0
- if os.name == 'nt':
- maxsize = 2 ** 31 - 1
- else:
- try:
- maxsize = sys.maxint
- except AttributeError:
- maxsize = sys.maxsize
- if maxsize < 2 ** 32:
- assert_((vals < sys.maxsize).all())
- else:
- assert_((vals >= 2 ** 32).any())
-
def test_beta(self):
vals = self.rg.beta(2.0, 2.0, 10)
assert_(len(vals) == 10)