8000 Final sync by bashtage · Pull Request #10 · mattip/numpy · GitHub
[go: up one dir, main page]

Skip to content

Final sync #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 371 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
371 commits
Select commit Hold shift + click to select a range
31a8ead
TST: Fix tailing test on 32bit platofrms
bashtage Mar 27, 2018
3d5f1f3
BLD: Add conda recipe
bashtage Mar 27, 2018
27a27ca
ENH: Add integrated legacy generator
bashtage Mar 27, 2018
2557203
Merge pull request #13 from bashtage/legacy-experiments
bashtage Mar 28, 2018
f452fbe
CLN: Remove conda recipe
bashtage Mar 28, 2018
c4ab63e
CLN: Fix str for RandomGenerator
bashtage Mar 28, 2018
3fd4b60
DOC: Update legacy docs
bashtage Mar 28, 2018
dcdf421
BUG: Fix pickle for LegacyGenerator
bashtage Mar 28, 2018
91a6bbc
TST: Make test more verbose
bashtage Mar 28, 2018
532a027
Merge pull request #15 from bashtage/legacy-meta
bashtage Mar 28, 2018
b62875a
CLN: Add absolute_import to avoid noise
bashtage Apr 1, 2018
a4a4165
BUG: Fix absolute_import
bashtage Apr 2, 2018
2330bad
DOC: Spelling changes
bashtage Apr 2, 2018
28f6603
CLN: Remove redeclared type
bashtage Apr 2, 2018
7c53827
BLD: Enable no-sse2 flag
bashtage Apr 3, 2018
657aab0
SYNC/CLN: Sync with upstream changes
bashtage Apr 16, 2018
f3ef206
Merge pull request #16 from bashtage/sync-numpy
bashtage Apr 16, 2018
f878610
BLD: Add lm flag for non-windows platforms
bashtage May 2, 2018
2d6f9d6
Merge pull request #18 from bashtage/add-lm-flag
bashtage May 2, 2018
2d15ae4
typos in URLs
pdebuyl May 22, 2018
1cea186
Merge pull request #19 from pdebuyl/master
bashtage May 22, 2018
d16834c
DOC: Fix doc and example error
bashtage Jun 12, 2018
3bd8ddc
REF: Rename min and max macros
bashtage Jun 14, 2018
c2673f3
Merge pull request #21 from bashtage/rename-min-max-macros
bashtage Jun 14, 2018
ce22f0c
MAINT: Sync with NumPy changes
bashtage Jun 19, 2018
6ade4aa
ENH: Allow empty choice
bashtage Jul 3, 2018
63ababa
Merge pull request #22 from bashtage/sync-upstream
bashtage Jul 3, 2018
f8dc0ae
DOC: Provide a better explanation of bounded int generation
bashtage Sep 22, 2018
963c32e
Merge pull request #27 from bashtage/clarify-rand-int
bashtage Sep 22, 2018
8d9883a
MAINT: Sync with recent upstream changes
bashtage Sep 22, 2018
d1d3d10
DOC: Update docs for 1.15 release [skip ci]
bashtage Sep 22, 2018
f9f1501
Merge pull request #28 from bashtage/sync-upstream
bashtage Sep 22, 2018
44212b7
Merge pull request #1 from bashtage/master
bduvenhage Oct 2, 2018
2e6c2d6
Added an alternative interval generator using Lemire's algorithm. he …
bduvenhage Oct 3, 2018
88fd0f7
Added an alternative interval generator using Lemire's algorithm. he …
bduvenhage Oct 3, 2018
726fdc9
Added a param to RandomGenerator.randint(...) to allow one to choose …
bduvenhage Oct 3, 2018
01ada41
Fix C errors on VS.
bduvenhage Oct 3, 2018
658fae6
Setup travis to run fewer environments while testing.
bduvenhage Oct 3, 2018
450ea5a
Restore travis and appveyor settings.
bduvenhage Oct 3, 2018
5f18b4f
1) Made the parameter order and randint callees consistent. 2) Rename…
bduvenhage Oct 4, 2018
d105c43
DOC: Add license files
bashtage Oct 5, 2018
0613607
MAINT: Remove invalid escape
bashtage Oct 5, 2018
28555bc
Merge pull request #30 from bashtage/add-license
bashtage Oct 5, 2018
70f7c11
REF: Add path using umul
bashtage Oct 5, 2018
2fe3b21
Merge pull request #31 from bashtage/use-umul
bashtage Oct 5, 2018
e21778d
Added Lemire algorithms for generating random numbers within an inter…
bduvenhage Oct 11, 2018
8bd04b4
Comment update. Still need to add cross platform AND architecture alt…
bduvenhage Oct 11, 2018
011f6a2
Some small shuffles and a ToDo comment while testing. bounded_lemire_…
bduvenhage Oct 12, 2018
f346c91
Test non 128bit code.
bduvenhage Oct 17, 2018
04952c9
Test non 128bit code path when 128bit not available.
bduvenhage Oct 17, 2018
9efa940
Added use_masked as param to _bounded tests in benchmark and enabled …
bduvenhage Oct 17, 2018
f3f427d
Added __umulh instrinsic when on _WIN64 architecture.
bduvenhage Oct 18, 2018
ddb6208
Moved condition to use 32-bit generator if range in 32-bit to callee …
bduvenhage Oct 18, 2018
3538ab5
Added and updated some comments.
bduvenhage Oct 18, 2018
3ba347e
Manual fixes to comments and indents.
bduvenhage Oct 18, 2018
d198f07
clang-format with .clang-format file:
bduvenhage Oct 18, 2018
dd6a136
Example of how buffered_uint8 could be abstracted in disributions.c.
bduvenhage Oct 19, 2018
30418cd
Added Lemire rejection sampling for 8 and 16 bit random numbers.
bduvenhage Oct 20, 2018
9d1b60e
Fixed one or two comments and added the unused buffer back to the uin…
bduvenhage Oct 20, 2018
ef49be9
Removed unused 32-bit random buffer.
bduvenhage Oct 21, 2018
531747b
CLN: Add guards to headers
bashtage Oct 21, 2018
bd7127d
Updated benchmark to test Lemire sampling in the worst, typical avera…
bduvenhage Oct 22, 2018
f3b0a2c
Updated the default max bound for benchmark timer_8bit_bounded.
bduvenhage Oct 22, 2018
5aea934
Trigger CI tests.
bduvenhage Oct 22, 2018
5fdedc9
Removed --full benchmark from CI tests.
bduvenhage Oct 22, 2018
87751ff
Trigger CI tests.
bduvenhage Oct 23, 2018
9ca8413
ENH/BUG: Add Xoshiro256starstar generator
bashtage Oct 20, 2018
63143f7
Merge pull request #33 from bashtage/header-guard
bashtage Oct 23, 2018
2f68d87
Merge pull request #32 from bashtage/xoshiro256starstar
bashtage Oct 23, 2018
c41cbef
DOC: Update docs with Xoshiro additions
bashtage Oct 23, 2018
7f17147
Merge pull request #34 from bashtage/update-docs
bashtage Oct 23, 2018
37bea4b
DOC: Update readme
bashtage Oct 24, 2018
2288f2e
Merge branch 'master' into lemire_bounded_random
bduvenhage Oct 24, 2018
803de1f
Merge pull request #2 from bashtage/master
bduvenhage Oct 24, 2018
eacd543
Merge pull request #3 from bduvenhage/master
bduvenhage Oct 24, 2018
2f8ecf6
UPD: Sync with upstream changes
bashtage Nov 5, 2018
5ed4d6d
BLD: Update dependency minimums
bashtage Nov 6, 2018
90af690
Merge pull request #35 from bashtage/sync-recent-numpy-changes
bashtage Nov 6, 2018
d509d33
Merge pull request #29 from bduvenhage/lemire_bounded_random
bashtage Nov 7, 2018
f80e160
RLS: Small clean-up prior to 1.15.1 release
bashtage Nov 10, 2018
6701896
REF: Refactor benchmark
bashtage Nov 11, 2018
e937ebd
Merge pull request #37 from bashtage/benchmark-improve
bashtage Nov 11, 2018
6173d8f
REF: Improve performance testing
bashtage Nov 11, 2018
f879e4f
ENH: Cast covariance to double in random mvnormal
bashtage Dec 14, 2018
7695f19
BUG: Ensure buffer_loc is reset in DSFMT
bashtage Feb 4, 2019
dc6a542
Merge pull request #39 from bashtage/dsfmt-jump-fixes
bashtage Feb 4, 2019
a449164
DOC: Update dirichlet documentation
bashtage Feb 4, 2019
ec81a8e
DOC: Update beta docstring
bashtage Feb 4, 2019
ea65884
BUG: Fix weibull for a=0
bashtage Feb 4, 2019
977b8a3
CLN: Add language_level
bashtage Feb 4, 2019
b42a1b1
BUG: Raise on nan probabilities
bashtage Feb 4, 2019
67ddb4c
CLN: Remove trailing whitespace
bashtage Feb 4, 2019
197da5e
DOC: Fix doc strings
bashtage Feb 4, 2019
7ee40c2
Merge pull request #40 from bashtage/sync-upstream-16.1
bashtage Feb 4, 2019
6887a96
RLS: Release 1.16.0
bashtage Feb 5, 2019
45043e2
Merge pull request #41 from bashtage/ 10000 rls-1160
bashtage Feb 5, 2019
89293ad
DOC: Fix issue in README.rst
bashtage Feb 5, 2019
3233d69
DOC: Update versions supported
bashtage Feb 5, 2019
e454334
BUG: Protect gamma generation from 0 input
bashtage Feb 18, 2019
cf72d30
TST: Ensure bad value tests are run on new generators
bashtage Feb 18, 2019
fe9cd13
Merge pull request #44 from bashtage/doc-and-other-small-fixes
bashtage Feb 18, 2019
bc0abff
CLN: Match declaration and function
bashtage Feb 18, 2019
e5be493
DOC: Sync upstream doc changes
bashtage Feb 18, 2019
382eba3
BUG: Catch 0.0 shape parameter in float gamme
bashtage Feb 18, 2019
bdc5383
Merge pull request #45 from bashtage/gamma-float-bug
bashtage Feb 19, 2019
5708029
DOC/ENH: Update docstring and enhance logistic
bashtage Feb 19, 2019
7c90d56
CLN/REF: Reorder _legacy to match generator
bashtage Feb 19, 2019
fec6557
Merge pull request #46 from bashtage/final-cleanups
bashtage Feb 19, 2019
5785ca7
ENH: Create boolean and integer ufuncs for isnan, isinf, and isfinite.
qwhelan Feb 26, 2019
175df24
DOC: UPdate docs to reflect upstream changes
bashtage Mar 15, 2019
1511b19
Merge pull request #49 from bashtage/sync-upstream
bashtage Mar 15, 2019
b296b29
DOC: Update README
bashtage Mar 15, 2019
b4256bd
add README-git.md
mattip Mar 20, 2019
9bdb3c7
Merge 'bashtage/randomgen' into randomgen
mattip Mar 20, 2019
f31006a
DOC: fixup actual commands used
mattip Mar 20, 2019
4437112
BUILD: move files out of _randomgen
mattip Mar 20, 2019
e927920
BUILD: first cut at building randomgen
mattip Mar 20, 2019
0adab55
upgrade 'cythonize' and fix absolute imports to relative
mattip Mar 21, 2019
d301712
DOC, BUILD: fail the devdoc build if there are warnings
mattip Mar 21, 2019
601421b
DOC: Attempting to remove duplicate documentation.
bmakos Mar 21, 2019
d079759
MAINT: define NPY_NO_DEPRECATED_API and fix other warnings
mattip Mar 21, 2019
c8cd7b7
Merge pull request #12547 from bashtage/mvnormal-tol-check
ahaldane Mar 21, 2019
0eda21b
Merge pull request #13170 from mattip/doc-warnings-to-error
rgommers Mar 21, 2019
67dbbf7
MAINT: enable pgc64 by always using PCG_EMULATED_MATH
mattip Mar 22, 2019
ca1a509
MAINT: refactor so import randomgen works
mattip Mar 22, 2019
161f69e
MAINT: add TODO comments for pcg64 improvements
mattip Mar 23, 2019
289d804
BENCH: fix Savez suite, previously was actually calling pickle.dump()
qwhelan Mar 23, 2019
a3303a2
MAINT: fix imports, module name in setup.py; remove _testing
mattip Mar 23, 2019
03c664f
Merge pull request #13174 from bmakos/Fix#13013
mattip Mar 24, 2019
6c75254
Merge pull request #13181 from qwhelan/bench_savez
mattip Mar 25, 2019
81f0dda
MAINT: Rewrite numpy.pad without concatenate (gh-11358)
lagru Mar 25, 2019
28bd9a2
MAINT: make cythonize non-recursive, restore examples to proper place
mattip Mar 25, 2019
f65e2d0
MAINT: update to randomgen 7bca296c0b9
mattip Mar 25, 2019
d6dcaed
DOC: correction to numpy.pad docstring (#13149)
grlee77 Mar 25, 2019
170fbbb
ENH: replace mtrand with LegacyGenerator, tweak for compatibility
mattip Mar 25, 2019
b34ed1b
BUG: port f879ef4 to fix GH10839
mattip Mar 26, 2019
4477134
BUG: minimized difference between generator.pyx and _legacy.pyx
mattip Mar 26, 2019
e000e61
DOC: fix namespace in doctests, mark results that are random
mattip Mar 26, 2019
16ba6ea
MAINT: update to randomgen commit 95c8cdd1c
mattip Mar 26, 2019
e6147b9
MAINT: add overlap checks to choose, take, put, putmask (#13182)
ahaldane Mar 27, 2019
39f0dbf
DOC: Use std docstring for multivariate normal (#13203)
bashtage Mar 28, 2019
4397270
BUILD: pin sphinx to before-2.0.0
mattip Mar 28, 2019
fd105d1
Merge pull request #13206 from mattip/pin-sphinx
rgommers Mar 28, 2019
db5fcc8
Merge pull request #12988 from qwhelan/bool_ufunc
eric-wieser Mar 29, 2019
15b14c5
MAINT: Simplify logic in convert_datetime_to_datetimestruct
eric-wieser Mar 26, 2019
27efe4d
TST: add tests for the existence and round-tripping of datetime limits
eric-wieser Mar 26, 2019
303b2d5
MAINT: merge randomgen/fix-legacy
mattip Mar 29, 2019
5128c5a
Adding an example of successful execution of numpy.test() to the Docs
Mar 29, 2019
e74cbc3
TST: always publish Azure tests
tylerjereddy Mar 29, 2019
0adb9be
Merge pull request #13188 from eric-wieser/extract-unit
tylerjereddy Mar 29, 2019
b30b8e2
Merge pull request #13217 from tylerjereddy/azure_tests_always_pub
charris Mar 30, 2019
bea6946
MAINT: cleanup of fast_loop_macros.h
qwhelan Mar 29, 2019
838abd7
MAINT: remove OUTPUT_LOOP_FAST macro and use UNARY_LOOP_FAST instead
qwhelan Mar 29, 2019
4b1d5cb
address comments on #9355
Mar 30, 2019
4685279
ENH: Improve error message for np.repeat
esc Mar 30, 2019
084e32e
Merge pull request #13224 from esc/better_error_for_repeats
mattip Mar 31, 2019
ad885ae
DOC: Fix small issues in mtrand doc strings
bashtage Mar 31, 2019
c93e795
Merge pull request #13216 from vrindaaa/issue-12452
mattip Mar 31, 2019
a8eca5c
Merge pull request #13208 from qwhelan/charris_followup
mattip Mar 31, 2019
ba96ca5
BUG: fix doctests
mattip Mar 30, 2019
51140bd
Merge pull request #13226 from bashtage/mtrand-doc-clean
mattip Mar 31, 2019
f297d31
BUG: Fix of `var` method for complex object arrays
cnighut Apr 1, 2019
a884450
MAINT: Sync with randomgen changes
bashtage Apr 1, 2019
ce5857d
TST: Incorporate edge tests
bashtage Apr 1, 2019
ac66298
MAINT/DOC: Update import locations
bashtage Apr 1, 2019
ee3593d
Merge pull request #2 from bashtage/randomgen-update
mattip Apr 1, 2019
67bcddb
TST: Fix test tolerance
bashtage Apr 1, 2019
783e88f
BUG/MAINT: fix reference count error on invalid input to ndarray.flat…
adeak Apr 2, 2019
e8bd864
DOC: Correctly document the minimum required Sphinx version (#13231)
kritisingh1 Apr 2, 2019
68f2480
DOC: Improve mtrand docstrings
bashtage Apr 2, 2019
2821126
MAINT: replace SETREF with assignment to ret array in ndarray.flat
adeak Apr 2, 2019
bf2feee
MAINT: Remove complex_normal
bashtage Apr 2, 2019
8aeb1e0
Merge pull request #3 from bashtage/randomgen-fixes
mattip Apr 2, 2019
564cffe
BUG: fix docstring tests
mattip Apr 2, 2019
3c977be
Merge pull request #13244 from bashtage/additional-doc-fixes
mattip Apr 2, 2019
173a210
DOC: fix docstring for floor_divide (#13242)
ay11111111111 Apr 2, 2019
8edc438
Merge pull request #13243 from adeak/maint_flat_nosetref_refactor
charris Apr 2, 2019
c06c339
MAINT: Sync with upstream changes
bashtage Apr 2, 2019
c59585e
Merge pull request #4 from bashtage/port-more-changes
mattip Apr 2, 2019
a1c1505
Update release notes
kikocorreoso Apr 2, 2019
96e9b1d
TST: fail Azure CI if test failures
tylerjereddy Apr 2, 2019
9eb9c35
Merge pull request #13253 from tylerjereddy/azure_hard_fail_after_tes…
charris Apr 2, 2019
c1bf6a6
DOC : PyArray_Descr.names undocumented (#13234)
vrindaaa Apr 3, 2019
0a9c313
BUG: fix docstring tests
mattip Apr 2, 2019
b7e01f3
MAINT: move documentation, add to autosummary
mattip Apr 2, 2019
882a542
merge branches
mattip Apr 3, 2019
fc94ef3
DOC: add randomgen docs
mattip Apr 3, 2019
ef2601a
BUILD: re-apply update of numpydoc to latest master
mattip Apr 3, 2019
f486ca2
fix (``code``s) sphinx parse warning
kikocorreoso Apr 3, 2019
e6ab326
BUG: _mtrand => _rand
mattip Apr 4, 2019
c62ee1b
DOC: Small readability improvement
spacescientist Apr 4, 2019
77b2be2
TST: use POWER8 OpenBLAS for CI
tylerjereddy Apr 2, 2019
8fdacfc
MAINT: f2py: Add a cast to avoid a compiler warning.
WarrenWeckesser Apr 5, 2019
8529dfa
Merge pull request #13269 from WarrenWeckesser/fortranobject-warnings
charris Apr 5, 2019
97e3c50
TST: use OpenBLAS for ARMv8 CI
tylerjereddy Apr 5, 2019
91ba86f
ENH: vectorize np.abs for unsigned ints and half, improving performan…
qwhelan Apr 6, 2019
d121225
Merge pull request #13271 from qwhelan/absolute
eric-wieser Apr 6, 2019
0be3fe4
DOC : Correcting bug on Documentation Page (Byteswapping) (#13262)
vrindaaa Apr 6, 2019
306bc58
BUG: Fix null pointer dereference in PyArray_DTypeFromObjectHelper
jwilk Apr 6, 2019
4a33963
Merge pull request #13273 from jwilk-forks/dtypefromobject-nullptr
charris Apr 6, 2019
31f942d
BUG: Correct handling of nans
bashtage Apr 8, 2019
d15ec91
Merge pull request #5 from bashtage/nan-protection-correction
mattip Apr 8, 2019
8b4885c
merge branches
mattip Apr 8, 2019
b6a2f65
Merge 'master' into randomgen
mattip Apr 8, 2019
80a1873
BUG: rework imports for random.mtrand._rand
mattip Apr 8, 2019
d77d18d
DOC: add exclude-members for numpydoc method-as-link handling
mattip Apr 8, 2019
497a00e
Merge pull request #13259 from spacescientist/master
mattip Apr 8, 2019
67b3659
Merge pull request #13264 from tylerjereddy/power8-openblas
mattip Apr 8, 2019
ca8a22c
Merge pull request #13270 from tylerjereddy/armv8-openblas
mattip Apr 8, 2019
b1c743a
add randomgen documentation to the tree
mattip Apr 8, 2019
61c090b
BUG: Correct handling of nans
bashtage Apr 8, 2019
686e9db
TST: Add tests for nan guards
bashtage Apr 8, 2019
c4d6c5d
BUILD: add ipython for documentation example syntax highlighting
mattip Apr 8, 2019
738d03e
merge master
mattip Apr 8, 2019
b728205
Add benchmark for sorting random array.
hameerabbasi Apr 8, 2019
23446e9
DOC: fix docstring
mattip Apr 8, 2019
5c3cb43
Merge pull request #13287 from hameerabbasi/bench-add-sort-random
charris Apr 8, 2019
96cacd7
ENH: use rotated companion matrix to reduce error
mtmoncur Mar 28, 2019
732d52a
ENH: rotate companion matrix for all polynomial bases
mtmoncur Apr 8, 2019
167a31b
Merge pull request #13202 from mtmoncur/rotated-companion-matrix
charris Apr 9, 2019
4006dc3
DOC: update numpydoc to latest master
mattip Apr 9, 2019
29c4b21
Merge pull request #13292 from mattip/numpydoc
rgommers Apr 9, 2019
e7b8ba6
fix test name
Apr 9, 2019
000939a
update tests
Apr 9, 2019
2d80144
BENCH: convert bencmarks to asv format
mattip Apr 9, 2019
d05327b
MAINT: remove files that were part of the origal repo
mattip Apr 9, 2019
d6a8cab
Merge pull request #13219 from kikocorreoso/nan_to_num-enhancement
ahaldane Apr 9, 2019
0b62364
Add benchmark for sorting random array.
hameerabbasi Apr 8, 2019
ad15281
MAINT: fix merge from master
mattip Apr 10, 2019
fab3265
Merge master into randomgen
mattip Apr 10, 2019
a8027f7
DOC: rework randomgen docs to integrate with numpy and fix some links
mattip Apr 10, 2019
95ee88f
ENH: remove convenience functions, require explicit call to gen.brng
mattip Apr 11, 2019
79b289a
ENH: move code out of numpy.random.randomgen into numpy.random
mattip Apr 11, 2019
ab080cf
BUG: __dealloc__ can be called without __init__ in some error modes
mattip Apr 12, 2019
a513351
BUG: adjust docs and doctests for namespace transition
mattip Apr 12, 2019
87f8ca5
DOC: fix doctests, benchmarks, emphasize each brng is a separate inst…
mattip Apr 12, 2019
5e03e1a
TEST: skip doctests that require scipy
mattip Apr 12, 2019
fa0aa36
BUILD: move original mtrand module to _mtrand
mattip Apr 12, 2019
610b5e0
DOC: adjust documentation for namespace change
mattip Apr 12, 2019
d8c7713
ENH: Extend multinomial
bashtage Apr 11, 2019
09bdc6e
BUG/ENH: Fix zipf changes missed in NumPy
bashtage Apr 11, 2019
c8bc266
DOC: Add alias docstrings for sample and ranf
bashtage Apr 12, 2019
8716c83
Merge pull request #8 from bashtage/sync-randomgen
mattip Apr 12, 2019
cb6f40f
ENH: add instance of RandomGenerator(Xoshiro512StarStar) as gen
mattip Apr 12, 2019
654ae37
MAINT: Simplify return types
bashtage Apr 12, 2019
9c9d951
BUG: Fix type in zipf
bashtage Apr 13, 2019
6c4bc0c
ENH: Improvce choice without replacement
bashtage Apr 13, 2019
0e7589e
Merge pull request #9 from bashtage/choice-dtype
mattip Apr 13, 2019
5b8eb72
DOC: fix doctests, move numpy.random -> numpy.random.gen in generator…
mattip Apr 13, 2019
1807e10
ENH: Finish hypergeometric 0
bashtage Apr 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: rework randomgen docs to integrate with numpy and fix some links
  • Loading branch information
mattip committed Apr 10, 2019
commit a8027f727ef3a60ca82934d00faafe2651afb0b3
2 changes: 2 additions & 0 deletions doc/source/reference/randomgen/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ directly in Numba after compiling the file distributions.c into a DLL or so.
An example showing the use of a more complicated distribution is in the
examples folder.

.. _randomgen_cython:

Cython
======

Expand Down
22 changes: 10 additions & 12 deletions doc/source/reference/randomgen/generator.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
.. currentmodule:: numpy.random.randomgen

Random Generator
----------------
The :class:`~randomgen.generator.RandomGenerator` provides access to
a wide range of distributions, and served as a replacement for
:class:`~numpy.random.RandomState`. The main difference between
the two is that :class:`~randomgen.generator.RandomGenerator` relies
on an additional basic RNG to manage state and generate the random
bits which are then transformed into random values from useful
distributions. The default basic RNG used by
:class:`~randomgen.generator.RandomGenerator` is
:class:`~randomgen.xoroshiro128.Xoroshiro128`. The basic RNG can be
changed by passing an instantized basic RNG to
:class:`~randomgen.generator.RandomGenerator`.
The :class:`~RandomGenerator` provides access to
a wide range of distributions, and served as a replacement for
:class:`~numpy.random.RandomState`. The main difference between
the two is that ``RandomGenerator`` relies on an additional basic RNG to
manage state and generate the random bits, which are then transformed into
random values from useful distributions. The default basic RNG used by
``RandomGenerator`` is :class:`~xoroshiro128.Xoroshiro128`. The basic RNG can be
changed by passing an instantized basic RNG to ``RandomGenerator``.

.. currentmodule:: numpy.random.randomgen.generator

.. autoclass:: RandomGenerator
:exclude-members:
Expand Down
120 changes: 59 additions & 61 deletions doc/source/reference/randomgen/index.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
Randomgen.RandomGen
===================
This package contains replacements for the NumPy
:class:`~numpy.random.RandomState` object that allows the core random number
generator be be changed.

.. current_module numpy.random.randomgen

numpy.random.randomgen
======================

This package modernizes the legacy
`~numpy.random.RandomState` object and allows changing the core random
number generator (RNG). The `~numpy.random.randomgen.RandomGenerator` can
be initialized with a number of different RNGs, and exposes many different
probability distributions.


Quick Start
-----------

Like :mod:`numpy.random`, RandomGen can be used at the module level.
This uses the default :class:`~randomgen.generator.RandomGenerator` which
uses normals provided by :class:`~randomgen.xoroshiro128.Xoroshiro128`.
By default, `generator.RandomGenerator` uses normals provided by
`xoroshiro128.Xoroshiro128` which will be faster than the legacy methods in
`numpy.random`

.. code-block:: python

# As replacement for numpy.random
import randomgen.generator as random
random.standard_normal()

:class:`~randomgen.generator.RandomGenerator` can also be used as a
replacement for :class:`~numpy.random.RandomState`, although the random
values are generated by :class:`~randomgen.xoroshiro128.Xoroshiro128`. It
also isn't possible to directly seed a
:class:`~randomgen.generator.RandomGenerator`.

`numpy.random.randomgen.RandomGenerator` can also be used as a replacement for
`~numpy.random.RandomState`, although the random values are generated by
`~numpyrandom.randomgen.xoroshiro128.Xoroshiro128`. Since ``randomgen``
separates the `~numpy.random.randomgen.RandomGenerator` from the RNG, it is not
possible to directly seed the generator.

.. code-block:: python

Expand All @@ -34,9 +37,9 @@ also isn't possible to directly seed a
rg.standard_normal()


Seeds can be passed to any of the basic RNGs. Here :class:`~randomgen.mt19937.MT19937`
is used and the :class:`~randomgen.generator.RandomGenerator` is accessed via
the property :attr:`~randomgen.mt19937.MT19937.generator`.
Seeds can be passed to any of the basic RNGs. Here `numpy.random.randomgen.
mt19937.MT19937` is used and the `~numpy.random.randomgen.RandomGenerator` is
accessed via the attribute `~numpy.random.randomgen.mt19937.MT19937.generator`.

.. code-block:: python

Expand All @@ -48,24 +51,23 @@ the property :attr:`~randomgen.mt19937.MT19937.generator`.
Introduction
------------
RandomGen takes a different approach to producing random numbers from the
:class:`numpy.random.RandomState` object used in NumPy. Random number
generation is separated into two components, a basic RNG and a random
generator.
:class:`numpy.random.RandomState` object. Random number generation is
separated into two components, a basic RNG and a random generator.

The basic RNG has a limited set of responsibilities -- it manages the
The basic RNG has a limited set of responsibilities. It manages the
underlying RNG state and provides functions to produce random doubles and
random unsigned 32- and 64-bit values. The basic random generator also handles
all seeding since this varies when using alternative basic RNGs.

The random generator (:class:`~randomgen.generator.RandomGenerator`) takes the
The `random generator <~numpy.random.randomgen.RandomGenerator>` takes the
basic RNG-provided functions and transforms them into more useful
distributions, e.g., simulated normal random values. This structure allows
alternative basic RNGs to be used without code duplication.

The :class:`~randomgen.generator.RandomGenerator` is the user-facing object
The `~numpy.random.randomgen.RandomGenerator` is the user-facing object
that is nearly identical to :class:`~numpy.random.RandomState`. The canonical
method to initialize a generator passes a basic RNG --
:class:`~randomgen.mt19937.MT19937`, the underlying RNG in NumPy -- as the
method to initialize a generator passes a basic RNG -- `~numpy.random.
randomgen.mt19937.MT19937`, the underlying RNG in NumPy -- as the
sole argument. Note that the basic RNG must be instantized.

.. code-block:: python
Expand All @@ -81,9 +83,9 @@ Seed information is directly passed to the basic RNG.
rg = RandomGenerator(MT19937(12345))
rg.random_sample()

A shorthand method is also available which uses the
:meth:`~randomgen.mt19937.MT19937.generator` property from a basic RNG to
access an embedded random generator.
A shorthand method is also available which uses the `~numpy.random.randomgen.
mt19937.MT19937.generator` property from a basic RNG to access an embedded
random generator.

.. code-block:: python

Expand All @@ -95,13 +97,14 @@ What's New or Different
.. warning::

The Box-Muller method used to produce NumPy's normals is no longer available
in :class:`~randomgen.generator.RandomGenerator`. It is not possible to
reproduce the random values using :class:`~randomgen.generator.RandomGenerator`
for the normal distribution or any other distribution that relies on the
normal such as the gamma or student's t. If you require backward compatibility, a
legacy generator, :class:`~randomgen.legacy.LegacyGenerator`, has been created
which can fully reproduce the sequence produced by NumPy.

in `~numpy.random.randomgen.RandomGenerator`. It is not possible to
reproduce the random values using `~numpy.random.randomgen.RandomGenerator`
for the normal distribution or any other distribution that
relies on the normal such as the gamma or student's t. If you require
backward compatibility, a legacy generator, `~numpy.random.randomgen.legacy.
LegacyGenerator`, has been created which can fully reproduce the sequence
produced by NumPy.

* The normal, exponential and gamma generators use 256-step Ziggurat
methods which are 2-10 times faster than NumPy's Box-Muller or inverse CDF
implementations.
Expand All @@ -110,20 +113,18 @@ What's New or Different
select distributions
* Optional ``out`` argument that allows existing arrays to be filled for
select distributions
* Simulate from the complex normal distribution
(:meth:`~randomgen.generator.RandomGenerator.complex_normal`)
* :func:`~randomgen.entropy.random_entropy` provides access to the system
* `~numpy.random.randomgen.entropy.random_entropy` provides access to the system
source of randomness that is used in cryptographic applications (e.g.,
``/dev/urandom`` on Unix).
* All basic random generators functions to produce doubles, uint64s and
uint32s via CTypes (:meth:`~randomgen.xoroshiro128.Xoroshiro128.ctypes`)
and CFFI (:meth:`~randomgen.xoroshiro128.Xoroshiro128.cffi`). This allows
these basic RNGs to be used in numba.
* All basic random generators functions can produce doubles, uint64s and
uint32s via CTypes (`~numpy.random.randomgen.xoroshiro128.Xoroshiro128.ctypes`)
and CFFI (:meth:`~numpy.random.randomgen.xoroshiro128.Xoroshiro128.cffi`).
This allows these basic RNGs to be used in numba.
* The basic random number generators can be used in downstream projects via
Cython.
:ref:`Cython <randomgen_cython>`.
* Support for Lemire’s method [Lemire]_ of generating uniform integers on an
arbitrary interval by setting ``use_masked=True`` in
(:meth:`~randomgen.generator.RandomGenerator.randint`).
`~umpy.random.randomgen.generator.RandomGenerator.randint`.


See :ref:`new-or-different` for a complete list of improvements and
Expand All @@ -144,41 +145,40 @@ The main innovation is the inclusion of a number of alternative pseudo-random nu
generators, 'in addition' to the standard PRNG in NumPy. The included PRNGs are:

* MT19937 - The standard NumPy generator. Produces identical results to NumPy
using the same seed/state. Adds a jump function that advances the generator
as-if 2**128 draws have been made (:meth:`~randomgen.mt19937.MT19937.jump`).
See `NumPy's documentation`_.
using the same seed/state. Adds a
`~numpy.random.randomgen.mt19937.MT19937.jump` function that advances the
generator as-if ``2**128`` draws have been made. See `numpy.random`.
* dSFMT - SSE2 enabled versions of the MT19937 generator. Theoretically
the same, but with E377 a different state and so it is not possible to produce a
sequence identical to MT19937. Supports ``jump`` and so can
be used in parallel applications. See the `dSFMT authors' page`_.
* XoroShiro128+ - Improved version of XorShift128+ with better performance
and statistical quality. Like the XorShift generators, it can be jumped
to produce multiple streams in parallel applications. See
:meth:`~randomgen.xoroshiro128.Xoroshiro128.jump` for details.
`~numpy.random.randomgen.xoroshiro128.Xoroshiro128.jump` for details.
More information about this PRNG is available at the
`xorshift, xoroshiro and xoshiro authors' page`_.
* XorShift1024*φ - Fast fast generator based on the XSadd
generator. Supports ``jump`` and so can be used in
parallel applications. See the documentation for
:meth:`~randomgen.xorshift1024.Xorshift1024.jump` for details. More information
about these PRNGs is available at the
`~numpy.random.randomgen.xorshift1024.Xorshift1024.jump` for details. More
information about these PRNGs is available at the
`xorshift, xoroshiro and xoshiro authors' page`_.
* Xorshiro256** and Xorshiro512** - The most recently introduced XOR,
shift, and rotate generator. Supports ``jump`` and so can be used in
parallel applications. See the documentation for
:meth:`~randomgen.xoshiro256starstar.Xoshirt256StarStar.jump` for details. More
information about these PRNGs is available at the
`~numpy.random.randomgen.xoshiro256starstar.Xoshirt256StarStar.jump` for
details. More information about these PRNGs is available at the
`xorshift, xoroshiro and xoshiro authors' page`_.
* PCG-64 - Fast generator that support many parallel streams and
can be advanced by an arbitrary amount. See the documentation for
:meth:`~randomgen.pcg64.PCG64.advance`. PCG-64 has a period of
`~numpy.random.randomgen.pcg64.PCG64.advance`. PCG-64 has a period of
:math:`2^{128}`. See the `PCG author's page`_ for more details about
this class of PRNG.
* ThreeFry and Philox - counter-based generators capable of being advanced an
arbitrary number of steps or generating independent streams. See the
`Random123`_ page for more details about this class of PRNG.

.. _`NumPy's documentation`: https://docs.scipy.org/doc/numpy/reference/routines.random.html
.. _`dSFMT authors' page`: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/
.. _`xorshift, xoroshiro and xoshiro authors' page`: http://xoroshiro.di.unimi.it/
.. _`PCG author's page`: http://www.pcg-random.org/
Expand Down Expand Up @@ -215,14 +215,12 @@ New Features

Changes
~~~~~~~

This package was developed independently of NumPy and was integrated in version
1.17.0. The original repo is at https://github.com/bashtage/randomgen.

.. toctree::
:maxdepth: 2

Change Log <change-log>

Indices and tables
~~~~~~~~~~~~~~~~~~

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
2 changes: 1 addition & 1 deletion numpy/random/randomgen/generator.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cdef class RandomGenerator:

Notes
-----
The Python stdlib module "random" contains pseudo-random number generator
The Python stdlib module `random` contains pseudo-random number generator
with a number of methods that are similar to the ones available in
``RandomGenerator``. It uses Mersenne Twister, and this basic RNG can be
accessed using ``MT19937``. ``RandomGenerator``, besides being
Expand Down
0