diff options
author | Robert Kern <robert.kern@gmail.com> | 2019-06-25 20:52:03 -0700 |
---|---|---|
committer | Robert Kern <robert.kern@gmail.com> | 2019-06-25 20:52:03 -0700 |
commit | 45473e3e7d661ebdfa97afa757b9cbba103a155e (patch) | |
tree | b29f146b9c04fb8c61ceeea4494ba5346fd8bc45 /numpy/random/tests/test_direct.py | |
parent | 4668b46310e74b2f3c78eb213b6d796456278942 (diff) | |
download | numpy-45473e3e7d661ebdfa97afa757b9cbba103a155e.tar.gz |
ENH: Add SFC64 BitGenerator.
Diffstat (limited to 'numpy/random/tests/test_direct.py')
-rw-r--r-- | numpy/random/tests/test_direct.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/numpy/random/tests/test_direct.py b/numpy/random/tests/test_direct.py index 38d21062b..1e824fbcc 100644 --- a/numpy/random/tests/test_direct.py +++ b/numpy/random/tests/test_direct.py @@ -7,7 +7,7 @@ from numpy.testing import (assert_equal, assert_allclose, assert_array_equal, import pytest from numpy.random import ( - Generator, MT19937, PCG64, Philox, RandomState, SeedSequence + Generator, MT19937, PCG64, Philox, RandomState, SeedSequence, SFC64 ) from numpy.random.common import interface @@ -385,3 +385,18 @@ class TestMT19937(Base): bit_generator.state = tup actual = rs.integers(2 ** 16) assert_equal(actual, desired) + + +class TestSFC64(Base): + @classmethod + def setup_class(cls): + cls.bit_generator = SFC64 + cls.bits = 64 + cls.dtype = np.uint64 + cls.data1 = cls._read_csv( + join(pwd, './data/sfc64-testset-1.csv')) + cls.data2 = cls._read_csv( + join(pwd, './data/sfc64-testset-2.csv')) + cls.seed_error_type = (ValueError, TypeError) + cls.invalid_init_types = [(3.2,), ([None],), (1, None)] + cls.invalid_init_values = [(-1,)] |