Skip to content

Commit

Permalink
BUILD: move files out of _randomgen
Browse files Browse the repository at this point in the history
first cut at building randomgen
upgrade 'cythonize' and fix absolute imports to relative
define NPY_NO_DEPRECATED_API and fix other warnings
enable pgc64 by always using PCG_EMULATED_MATH
refactor so import randomgen works
add TODO comments for pcg64 improvements
fix imports, module name in setup.py; remove _testing
make cythonize non-recursive, restore examples to proper place
update to randomgen 7bca296c0b9
replace mtrand with LegacyGenerator, tweak for compatibility
port f879ef4 to fix GH10839
minimized difference between generator.pyx and _legacy.pyx
fix namespace in doctests, mark results that are random
update to randomgen commit 95c8cdd1c
Incorporate testing of edge cases into main tests
Rename test files to describe their purpose
Import import locations to reflect numpy paths
Correct tolerance on float32 tests
Remove set_printoptions
Remove complex normal
Remove future imports
Pull in BasicRNG source changes from original author
Small doc fixes
_mtrand => _rand
Improve consistency of nan handling
Prevent nans prducing values from int functions
add randomgen documentation to the tree
  • Loading branch information
mattip committed May 20, 2019
1 parent 6e386c0 commit fa8af41
Show file tree
Hide file tree
Showing 220 changed files with 10,969 additions and 8,906 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,16 @@ numpy/core/src/umath/test_rational.c
numpy/core/src/umath/umath_tests.c
numpy/distutils/__config__.py
numpy/linalg/umath_linalg.c
doc/source/reference/generated
doc/source/**/generated/
benchmarks/results
benchmarks/html
benchmarks/env
benchmarks/numpy
# cythonized files
cythonize.dat
numpy/random/mtrand/mtrand.c
numpy/random/randomgen/*.c
numpy/random/randomgen/legacy/*.c
numpy/random/mtrand/randint_helpers.pxi
numpy/random/randomgen/bounded_integers.pyx
numpy/random/randomgen/bounded_integers.pxd
10 changes: 0 additions & 10 deletions _randomgen/MANIFEST.in

This file was deleted.

16 changes: 8 additions & 8 deletions _randomgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ which can fully reproduce the sequence produced by NumPy.
from randomgen import RandomGenerator
# Default basic PRNG is Xoroshiro128
rnd = RandomGenerator()
w = rnd.standard_normal(10000, method='zig')
x = rnd.standard_exponential(10000, method='zig')
y = rnd.standard_gamma(5.5, 10000, method='zig')
w = rnd.standard_normal(10000)
x = rnd.standard_exponential(10000)
y = rnd.standard_gamma(5.5, 10000)
```

* Support for 32-bit floating randoms for core generators.
Expand Down Expand Up @@ -135,15 +135,15 @@ The RNGs include:
## Status

* Builds and passes all tests on:
* Linux 32/64 bit, Python 2.7, 3.4, 3.5, 3.6
* Linux 32/64 bit, Python 2.7, 3.4, 3.5, 3.6, 3.6
* PC-BSD (FreeBSD) 64-bit, Python 2.7
* OSX 64-bit, Python 3.6
* Windows 32/64 bit, Python 2.7, 3.5 and 3.6
* OSX 64-bit, Python 2.7, 3.5, 3.6, 3.7
* Windows 32/64 bit, Python 2.7, 3.5, 3.6 and 3.7

## Version

The version matched the latest version of NumPy where
`RandomGenerator(MT19937())` passes all NumPy test.
`LegacyGenerator(MT19937())` passes all NumPy test.

## Documentation

Expand All @@ -168,7 +168,7 @@ Building requires:
* Cython (0.26+)
* tempita (0.5+), if not provided by Cython

Testing requires pytest (3.0+).
Testing requires pytest (4.0+).

**Note:** it might work with other versions but only tested with these
versions.
Expand Down
22 changes: 11 additions & 11 deletions _randomgen/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ generators in Python and NumPy.
Python 2.7 Support
------------------

v1.16 is the final major version that supports Python 2.7. Any bugs in
v1.16 will be patched until the end of 2019. All future releases are
Python 3, with an initial minimum version of 3.5.
Release 1.16.0 is the final version that supports Python 2.7. Any bugs
in v1.16.0 will be patched until the end of 2019. All future releases
are Python 3, with an initial minimum version of 3.5.

Compatibility Warning
---------------------
Expand Down Expand Up @@ -51,9 +51,9 @@ Features
from randomgen import RandomGenerator
# Default basic PRNG is Xoroshiro128
rnd = RandomGenerator()
w = rnd.standard_normal(10000, method='zig')
x = rnd.standard_exponential(10000, method='zig')
y = rnd.standard_gamma(5.5, 10000, method='zig')
w = rnd.standard_normal(10000)
x = rnd.standard_exponential(10000)
y = rnd.standard_gamma(5.5, 10000)
- Support for 32-bit floating randoms for core generators. Currently
supported:
Expand Down Expand Up @@ -147,16 +147,16 @@ Status

- Builds and passes all tests on:

- Linux 32/64 bit, Python 2.7, 3.4, 3.5, 3.6
- Linux 32/64 bit, Python 2.7, 3.5, 3.6, 3.7
- PC-BSD (FreeBSD) 64-bit, Python 2.7
- OSX 64-bit, Python 3.6
- Windows 32/64 bit, Python 2.7, 3.5 and 3.6
- OSX 64-bit, Python 2.7, 3.5, 3.6, 3.7
- Windows 32/64 bit, Python 2.7, 3.5, 3.6, and 3.7

Version
-------

The version matched the latest version of NumPy where
``RandomGenerator(MT19937())`` passes all NumPy test.
``LegacyGenerator(MT19937())`` passes all NumPy test.

Documentation
-------------
Expand Down Expand Up @@ -185,7 +185,7 @@ Building requires:
- Cython (0.26+)
- tempita (0.5+), if not provided by Cython

Testing requires pytest (3.0+).
Testing requires pytest (4.0+).

**Note:** it might work with other versions but only tested with these
versions.
Expand Down
33 changes: 0 additions & 33 deletions _randomgen/appveyor.yml

This file was deleted.

20 changes: 0 additions & 20 deletions _randomgen/ci/conda-install.sh

This file was deleted.

3 changes: 0 additions & 3 deletions _randomgen/ci/pypi-install.sh

This file was deleted.

20 changes: 0 additions & 20 deletions _randomgen/doc/Makefile

This file was deleted.

36 changes: 0 additions & 36 deletions _randomgen/doc/make.bat

This file was deleted.

Loading

0 comments on commit fa8af41

Please sign in to comment.