diff options
author | mattip <matti.picus@gmail.com> | 2019-05-13 14:17:51 -0700 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-05-20 19:00:34 +0300 |
commit | 17e0070df93f4262908f884dca4b08cb7d0bba7f (patch) | |
tree | 2db0eec024d5e021a36e6dca9f4b97d118bc9444 /numpy/random/setup.py | |
parent | dd77ce3cb84986308986974acfe988575323f75a (diff) | |
download | numpy-17e0070df93f4262908f884dca4b08cb7d0bba7f.tar.gz |
MAINT: Implement API changes for randomgen-derived code
remove numpy.random.gen, BRNG.generator, pcg*, rand, randn
remove use_mask and Lemire's method, fix benchmarks for PCG removal
convert brng to bitgen (in C) and bit_generator (in python)
convert base R{NG,andom.*} to BitGenerator, fix last commit
randint -> integers, remove rand, randn, random_integers
RandomGenerator -> Generator, more "basic RNG" -> BitGenerator
random_sample -> random, jump -> jumped, resync with randomgen
Remove derived code from entropy
Port over changes accepted in upstream to protect log(0.0) where relevant
fix doctests for jumped, better document choice
Remove Python 2.7 shims
Use NPY_INLINE to simplify
Fix performance.py to work
Renam directory brng to bit_generators
Fix examples wiht new directory structure
Clarify relationship to historical RandomState
Remove references to .generator
Rename xoshiro256/512starstar
Diffstat (limited to 'numpy/random/setup.py')
-rw-r--r-- | numpy/random/setup.py | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/numpy/random/setup.py b/numpy/random/setup.py index fc7c9a886..5f3a48783 100644 --- a/numpy/random/setup.py +++ b/numpy/random/setup.py @@ -75,7 +75,6 @@ def configuration(parent_package='',top_path=None): sys.argv.remove('--no-sse2') DEBUG = False - PCG_EMULATED_MATH = False EXTRA_LINK_ARGS = [] EXTRA_LIBRARIES = ['m'] if os.name != 'nt' else [] EXTRA_COMPILE_ARGS = [] if os.name == 'nt' else [ @@ -88,18 +87,6 @@ def configuration(parent_package='',top_path=None): if sys.version_info < (3, 0): EXTRA_INCLUDE_DIRS += [join(MOD_DIR, 'src', 'common')] - PCG64_DEFS = [] - # TODO: remove the unconditional forced emulation, move code from pcg64.pyx - # to an #ifdef - if 1 or sys.maxsize < 2 ** 32 or os.name == 'nt': - # Force emulated mode here - PCG_EMULATED_MATH = True - PCG64_DEFS += [('PCG_FORCE_EMULATED_128BIT_MATH', '1')] - - if struct.calcsize('P') < 8: - PCG_EMULATED_MATH = True - defs.append(('PCG_EMULATED_MATH', int(PCG_EMULATED_MATH))) - DSFMT_DEFS = [('DSFMT_MEXP', '19937')] if USE_SSE2: if os.name == 'nt': @@ -112,7 +99,6 @@ def configuration(parent_package='',top_path=None): config.add_extension('entropy', sources=['entropy.c', 'src/entropy/entropy.c'], - include_dirs=[join('randomgen', 'src', 'entropy')], libraries=EXTRA_LIBRARIES, extra_compile_args=EXTRA_COMPILE_ARGS, extra_link_args=EXTRA_LINK_ARGS, @@ -148,15 +134,10 @@ def configuration(parent_package='',top_path=None): define_macros=defs, ) for gen in ['philox', 'threefry', 'threefry32', - 'xoroshiro128', 'xorshift1024', 'xoshiro256starstar', - 'xoshiro512starstar', - 'pcg64', 'pcg32', + 'xoroshiro128', 'xorshift1024', 'xoshiro256', + 'xoshiro512', ]: # gen.pyx, src/gen/gen.c - if gen == 'pcg64': - _defs = defs + PCG64_DEFS - else: - _defs = defs config.add_extension(gen, sources=['{0}.c'.format(gen), 'src/{0}/{0}.c'.format(gen)], include_dirs=['.', 'src', join('src', gen)], @@ -164,7 +145,7 @@ def configuration(parent_package='',top_path=None): extra_compile_args=EXTRA_COMPILE_ARGS, extra_link_args=EXTRA_LINK_ARGS, depends=['%s.pyx' % gen], - define_macros=_defs, + define_macros=defs, ) for gen in ['common']: # gen.pyx |