summaryrefslogtreecommitdiff
path: root/numpy/random
Commit message (Collapse)AuthorAgeFilesLines
* BUG: add missing c_distributions.pxd, enables cython use of random C-API ↵Matti Picus2020-03-1611-149/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (gh-15463) xref gh-14778 As pointed out in the comment by @jamesthomasgriffin, we did not include a pxd file to expose the distribution functions documented in the random c-api. This PR adds a c_distributions.pxd file that exposes them. Squashed commits: * BUG: add missing c_distributions.pxd to enable cython use of random C-API * ENH, TST: add npyrandom library like npymath, test cython use of it * BUG: actually prefix f-string with f * MAINT: fixes from review, add _bit_generato_bit_generator.pxd * STY: fixes from review * BLD: don't use nprandom library for mtrand legacy build * TST: WindowsPath cannot be used in subprocess's list2cmdline * MAINT, API: move _bit_generator to bit_generator * DOC: add release note about moving bit_generator * DOC, MAINT: fixes from review * MAINT: redo dtype determination from review
* convert shebang from python to python3 (#15687)Changqing Li2020-03-042-2/+2
| | | | Signed-off-by: Changqing Li <changqing.li@windriver.com>
* BUG: fix doctest exception messagesmattip2020-02-281-1/+1
|
* DOC: Document caveat in random.uniformmattip2020-02-151-2/+9
|
* Merge pull request #15465 from mwtoews/importsSebastian Berg2020-02-071-2/+2
|\ | | | | MAINT: cleanup unused imports; avoid redefinition of imports
| * MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-061-2/+2
| | | | | | | | | | | | | | * Cleanup unused imports (F401) of mostly standard Python modules, or some internal but unlikely referenced modules * Where internal imports are potentially used, mark with noqa * Avoid redefinition of imports (F811)
* | Documentation updated.przemb2020-02-062-31/+22
| |
* | Changes suggested in reviewprzemb2020-02-053-16/+11
| |
* | MAINT: Large overhead in some random functions #15460przemb2020-02-053-59/+53
|/ | | | | | | | | | | | | | slow calls to np.dtype.name replaced with np.dtype, mtrand.pyx and _generator.pyx updated, test test_warns_byteorder updated before: %timeit rs.random(): 520 ns ± 33.1 ns per loop %timeit rg.random(): 6.36 µs ± 222 ns per loop after: %timeit rs.random(): 453 ns ± 6.95 ns per loop %timeit rg.random(): 594 ns ± 9.66 ns per loop
* DOC: Correct get_state docKevin Sheppard2020-01-311-5/+7
| | | | Move flag to parameters
* STY,MAINT: avoid 'multiple imports on one line' (flake8 E401)Mike Taves2020-01-281-2/+3
| | | | | | * PEP 8: "Imports should usually be on separate lines" * Where modified, sort imported modules alphabetically * Clean-up unused imports from these expanded lines
* NEP: issue deprecation warning when creating ragged array (NEP 34)Matti Picus2020-01-213-7/+10
| | | | This implements NEP 34.
* MAINT: Remove unnecessary calls to PyArray_DATA from binomial functionsAlex Henrie2020-01-192-2/+0
|
* BLD: use 0.3.7 release version, add dependency on libgfortran5mattip2020-01-172-2/+2
|
* DOC: fix typosBrian Wignall2020-01-141-1/+1
|
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-058-37/+37
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-034-7/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* MAINT: remove dead code from reviewmattip2019-12-271-1/+0
|
* MAINT: unskip test on win32mattip2019-12-272-3/+2
|
* BUG: use tmp dir and check version for cython test (#15170)Matti Picus2019-12-262-17/+28
| | | | | | | | | | | | * BUG: use tmp dir and check version for cython test * TST, MAINT: skip on win32, fix formatting * TST: fixes from review * TST: fixes from review * TST: fixes from review
* DOC: Remove extraneous quoteKevin Sheppard2019-12-231-1/+1
|
* DOC: Correct documentation in choiceKevin Sheppard2019-12-231-13/+16
| | | | | | Correct docstring Correct exception message and standardize Use correct type identifiers
* DOC: Correct choice signatureKevin Sheppard2019-12-201-1/+1
| | | | Add shuffle to signature
* Fix typos, via a Levenshtein-style correctorBrian Wignall2019-12-191-1/+1
|
* MAINT: Fix randint 0d limits and other 0d cleanups (#15126)Nico Schlömer2019-12-181-2/+1
| | | * MAINT: only treat 0d case separately in randint, simplify some tests
* MAINT: random: Remove a few unused imports from test files.Warren Weckesser2019-12-153-3/+0
|
* Revert "DEP: issue deprecation warning when creating ragged array (NEP 34)"revert-14794-nep-0034-implRalf Gommers2019-12-063-10/+7
|
* API, DOC: change names to multivariate_hypergeometric, improve docsmattip2019-12-043-12/+12
|
* Merge pull request #15007 from mattip/random-c-api2Ralf Gommers2019-12-034-89/+94
|\ | | | | DOC, API: improve the C-API/Cython documentation and interfaces for random
| * API: revert changes to standard_t, cauchymattip2019-11-302-6/+6
| |
| * API: rename functions in distributions.c,hmattip2019-11-292-60/+51
| |
| * DOC, TST: refactor CFFI test, add file names to documentationmattip2019-11-292-35/+49
| |
* | Merge pull request #14794 from mattip/nep-0034-implRalf Gommers2019-12-023-7/+10
|\ \ | |/ |/| DEP: issue deprecation warning when creating ragged array (NEP 34)
| * MAINT: revert change to assert_array_equal, adjust testsmattip2019-10-313-3/+6
| |
| * DEP: issue deprecation warning when creating ragged array (NEP 34)mattip2019-10-313-4/+4
| |
* | Merge pull request #14954 from mattip/test-extending-cffiCharles Harris2019-11-274-5/+97
|\ \ | | | | | | TST. API: test using distributions.h via cffi
| * | TST: skip cffi tests when PYTHONOPTIMIZE>1, pycparser failsmattip2019-11-212-0/+12
| | |
| * | API, MAINT: export symbols on MSVC, fix typosmattip2019-11-211-3/+3
| | |
| * | TST. API: test using distributions.h via cffimattip2019-11-212-2/+82
| | |
* | | Merge pull request #14948 from mattip/document-randomCharles Harris2019-11-2712-25/+315
|\ \ \ | | | | | | | | DOC, API: add random.__init__.pxd and document random.* functions
| * | | DOC: update note from reviewmattip2019-11-211-84/+84
| | | |
| * | | MAINT: "See also" -> "See Also"mattip2019-11-211-23/+23
| | | |
| * | | DOC, API: add numpy.random.__index__.pxd and document numpy.random.* funcsmattip2019-11-2112-25/+315
| | | |
* | | | TST: skip if cython is not availablemattip2019-11-221-0/+6
|/ / /
* | | DOC: Clean up examples of low-level random accessKevin Sheppard2019-11-214-21/+37
|/ / | | | | | | | | | | Test examples on Linux and Windows Correct bug in Cython example Improve building instructions for numba examples
* | DOC, MAINT: fix documentation, remove __init__.pymattip2019-11-201-0/+0
| |
* | MAINT: move numpy/random/examples -> numpy/random/_examplesmattip2019-11-198-4/+4
| |
* | DOC: Clarify return type for default rngKevin Sheppard2019-11-191-3/+7
| | | | | | | | Ensure that default_rng has a return type to improve code completion
* | API: restructure and document numpy.random C-API (#14604)Matti Picus2019-11-1918-298/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * API: restructure and document numpy.random C-API * DOC: fix bad reference * API: ship, document, and start to test numpy.random C-API examples * API, DOC, TST: fix tests, refactor documentation to include snippets * BUILD: move public headers to numpy/core/include/numpy/random * TST: ignore DeprecationWarnings in setuptools and numba * DOC: document the C-API as used from Cython
* | Merge pull request #14878 from mattip/remove-sse2Warren Weckesser2019-11-141-5/+0
|\ \ | | | | | | BUILD: remove SSE2 flag from numpy.random builds