diff options
author | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2019-05-23 09:07:15 +0100 |
---|---|---|
committer | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2019-05-23 09:07:15 +0100 |
commit | 2c14e47834262de85673c0b71e94494a5f642268 (patch) | |
tree | 43cdf728b9747ffe4f48a1569b25df3a8dd12e78 /numpy/random/tests | |
parent | cdb2b0febd5e287c56b021bb1f55b21d62d618f4 (diff) | |
download | numpy-2c14e47834262de85673c0b71e94494a5f642268.tar.gz |
ENH: Split poisson_lam_max
Use type-dependent poisson lam max
Make private
Fix backward compat issue in loggam
Diffstat (limited to 'numpy/random/tests')
-rw-r--r-- | numpy/random/tests/test_against_numpy.py | 1 | ||||
-rw-r--r-- | numpy/random/tests/test_generator_mt19937.py | 4 | ||||
-rw-r--r-- | numpy/random/tests/test_randomstate.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/numpy/random/tests/test_against_numpy.py b/numpy/random/tests/test_against_numpy.py index a000e5db7..52e67214d 100644 --- a/numpy/random/tests/test_against_numpy.py +++ b/numpy/random/tests/test_against_numpy.py @@ -271,6 +271,7 @@ class TestAgainstNumPy(object): is_np=True) self._is_state_common() + @pytest.mark.xfail(reason='Definition of poisson_lam_max changed') def test_poisson_lam_max(self): assert_allclose(self.rg.poisson_lam_max, self.nprs.poisson_lam_max) diff --git a/numpy/random/tests/test_generator_mt19937.py b/numpy/random/tests/test_generator_mt19937.py index c20fc5b74..207ec1a2b 100644 --- a/numpy/random/tests/test_generator_mt19937.py +++ b/numpy/random/tests/test_generator_mt19937.py @@ -1074,7 +1074,7 @@ class TestRandomDist(object): assert_array_equal(actual, desired) def test_poisson_exceptions(self): - lambig = np.iinfo('l').max + lambig = np.iinfo('int64').max lamneg = -1 assert_raises(ValueError, random.poisson, lamneg) assert_raises(ValueError, random.poisson, [lamneg] * 10) @@ -1788,7 +1788,7 @@ class TestBroadcast(object): assert_raises(ValueError, neg_binom, n, bad_p_two * 3) def test_poisson(self): - max_lam = random.poisson_lam_max + max_lam = random._poisson_lam_max lam = [1] bad_lam_one = [-1] diff --git a/numpy/random/tests/test_randomstate.py b/numpy/random/tests/test_randomstate.py index 75c35ef62..066e4d661 100644 --- a/numpy/random/tests/test_randomstate.py +++ b/numpy/random/tests/test_randomstate.py @@ -1693,7 +1693,7 @@ class TestBroadcast(object): assert_raises(ValueError, neg_binom, n, bad_p_two * 3) def test_poisson(self): - max_lam = random.RandomState().poisson_lam_max + max_lam = random.RandomState()._poisson_lam_max lam = [1] bad_lam_one = [-1] |