Skip to content

Commit

Permalink
MAINT: fix imports, module name in setup.py; remove _testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Mar 23, 2019
1 parent 161f69e commit a3303a2
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 369 deletions.
50 changes: 25 additions & 25 deletions numpy/random/randomgen/_pickle.py
@@ -1,29 +1,29 @@
from .generator import RandomGenerator
# from .dsfmt import DSFMT
# from .mt19937 import MT19937
# from .pcg32 import PCG32
# from .pcg64 import PCG64
# from .philox import Philox
# from .threefry import ThreeFry
# from .threefry32 import ThreeFry32
# from .xoroshiro128 import Xoroshiro128
# from .xorshift1024 import Xorshift1024
# from .xoshiro256starstar import Xoshiro256StarStar
# from .xoshiro512starstar import Xoshiro512StarStar
# from .legacy import LegacyGenerator
#
# BasicRNGS = {'MT19937': MT19937,
# 'DSFMT': DSFMT,
# 'PCG32': PCG32,
# 'PCG64': PCG64,
# 'Philox': Philox,
# 'ThreeFry': ThreeFry,
# 'ThreeFry32': ThreeFry32,
# 'Xorshift1024': Xorshift1024,
# 'Xoroshiro128': Xoroshiro128,
# 'Xoshiro256StarStar': Xoshiro256StarStar,
# 'Xoshiro512StarStar': Xoshiro512StarStar,
# }
from .dsfmt import DSFMT
from .mt19937 import MT19937
from .pcg32 import PCG32
from .pcg64 import PCG64
from .philox import Philox
from .threefry import ThreeFry
from .threefry32 import ThreeFry32
from .xoroshiro128 import Xoroshiro128
from .xorshift1024 import Xorshift1024
from .xoshiro256starstar import Xoshiro256StarStar
from .xoshiro512starstar import Xoshiro512StarStar
from .legacy import LegacyGenerator

BasicRNGS = {'MT19937': MT19937,
'DSFMT': DSFMT,
'PCG32': PCG32,
'PCG64': PCG64,
'Philox': Philox,
'ThreeFry': ThreeFry,
'ThreeFry32': ThreeFry32,
'Xorshift1024': Xorshift1024,
'Xoroshiro128': Xoroshiro128,
'Xoshiro256StarStar': Xoshiro256StarStar,
'Xoshiro512StarStar': Xoshiro512StarStar,
}


def __generator_ctor(brng_name='mt19937'):
Expand Down
315 changes: 0 additions & 315 deletions numpy/random/randomgen/_testing.py

This file was deleted.

2 changes: 1 addition & 1 deletion numpy/random/randomgen/legacy/__init__.py
@@ -1,3 +1,3 @@
from randomgen.legacy.legacy import LegacyGenerator
from .legacy import LegacyGenerator

__all__ = ['LegacyGenerator']
2 changes: 1 addition & 1 deletion numpy/random/randomgen/legacy/_legacy.pyx
Expand Up @@ -20,7 +20,6 @@ from ..common cimport cont, disc, CONS_NONE, CONS_POSITIVE, CONS_NON_NEGATIVE, C
from ..distributions cimport brng_t
from .legacy_distributions cimport *
from ..xoroshiro128 import Xoroshiro128
from ..pickle import __legacy_ctor

np.import_array()

Expand Down Expand Up @@ -119,6 +118,7 @@ cdef class _LegacyGenerator:
self.state = state

def __reduce__(self):
from .._pickle import __legacy_ctor
return (__legacy_ctor,
(self.state['brng'],),
self.state)
Expand Down

0 comments on commit a3303a2

Please sign in to comment.