summaryrefslogtreecommitdiff
path: root/numpy/random
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: remove unused stdlib importsEmil Hessman2018-09-301-2/+1
|
* MAINT: remove redundant importsmattip2018-09-091-1/+0
|
* Merge pull request #11755 from gyk/patch-1Matti Picus2018-08-211-4/+4
|\ | | | | MAINT: Fix typos in random.hypergeometric's notes
| * MAINT: Fix typos in random.hypergeometric's notesYukun Guo2018-08-211-4/+4
| |
* | MAINT: reformat line spacing before test methodsmattip2018-08-191-1/+0
|/
* Merge pull request #11722 from eric-wieser/fix-random-lgtmCharles Harris2018-08-142-145/+55
|\ | | | | MAINT: Remove duplicate docstring and incorrect location of __all__ from np.random
| * MAINT: Remove duplicate docstring and incorrect location of __all__ from ↵Eric Wieser2018-08-122-145/+55
| | | | | | | | | | | | np.random This should fix a lot of LGTM errors
* | DOC: fix capitalization of kilojoulesMatthew Brett2018-08-131-1/+1
|/ | | | Spotted by keithbriggs - see: gh-11728.
* Comment erroneously describing method as Box-Muller.Rohit Pandey2018-07-071-1/+1
| | | The transform in line 620 onwards was the polar method, not Box-Muller. See section 11.3.1 of "Introduction to probability models" by Sheldon Ross (https://fac.ksu.edu.sa/sites/default/files/introduction-to-probability-model-s.ross-math-cs.blog_.ir_.pdf).
* MAINT: Move pytesttester outside of np.testing, to avoid creating ↵Eric Wieser2018-07-021-1/+1
| | | | | | | | unnecessary import dependencies pytesttester is used by every single subpackage, so making it depend on np.testing just creates cyclic dependencies that can lead to circular imports Relates to #11457
* fixes from reviewmattip2018-06-212-5/+6
|
* ENH: Allow size=0 in numpy.random.choicemattip2018-06-193-15/+23
|
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-162-33/+33
|
* MAINT: Don't use dtype strings when the dtypes themselves can be usedEric Wieser2018-06-131-26/+25
|
* PERF: Improve performance of random permutationKevin Sheppard2018-05-091-4/+18
| | | | | | | Use fancy indexing instead of a shuffle to avoid unnecessary object access closes #11013
* DOC: Fix negative binomial documentation.Hameer Abbasi2018-04-201-10/+8
|
* Merge pull request #10878 from mattip/devdocsRalf Gommers2018-04-161-27/+27
|\ | | | | DOC: rework documents and silence warnings during sphinx build
| * silence warnings, matplotlib deprecated normed in favor of densitymattip2018-04-101-27/+27
| |
* | Merge pull request #10903 from subhrm/10902-docu-fixCharles Harris2018-04-151-1/+1
|\ \ | | | | | | DOC: Fix link in `See Also` section of `randn` docstring.
| * | Fixes #10902: Changed `See Also` doc-string section of `randn`Subhendu Ranjan Mishra2018-04-131-1/+1
| |/
* | DOC, BUG : Bad link to `np.random.randint` (#10901)Subhendu2018-04-131-1/+1
|/ | | | | | * fixes #10886 : Bad link to `np.random.randint` * Issue #10886: Change from `np.random.randint` to `randint` in 'See Also` doc-string section of mtrand.pyx
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-062-8/+2
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Update modules `test` to PytestTester.Charles Harris2018-04-041-2/+3
| | | | | | | | Numpy can now be tested using the standard `python -c"import numpy; numpy.test()"` construct.
* MAINT: Remove "bench" from testing modules `__init__`s.Charles Harris2018-03-311-1/+0
| | | | | The "bench" testing with the old bench files is no longer supported. These days we use `runtests.py` and `asv`.
* MAINT: Covariance must be symmetric as well as positive-semidefinite. (#10669)Oleg Zabluda2018-03-041-7/+8
| | | | | | | | * [BUG] add "symmetric" to "positive-semidefinite" * Break line, fix comments * break long line
* More misc. typosluz.paz2018-01-041-1/+1
| | | Found via `codespell`
* Documentation and misc. typosluzpaz2017-12-301-1/+1
| | | Found via `codespell`
* ENH: don't show boolean dtype, as it is impliedEric Wieser2017-11-131-1/+1
|
* DEP, ENH: deprecate UPDATEIFCOPY (except for nditer) and replace with ↵Matti Picus2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WRITEBACKIFCOPY (#9639) * ENH: add API to resolve UPDATEONCOPY outside dealloc, test and use * BUG: Fix usage of keyword "from" as argument name for "can_cast". Also removed inconsistency between the second argument name between documentation ("totype") and code ("to"). * UPDATEIFCOPY -> WRITEBACKIFCOPY, documentation * fixes for review * review2, fix new test * fix new test for using self.assert_deprecated * change deprecation logic as per review * new logic exposed places where PyArray_ResolveWritebackIfCopy not called * deprecate PyArray_XDECREF_ERR in favor of PyArray_DiscardWritebackIfCopy * code review changes * clean up merge cruft * fix from review * fixes from review * extend the release note
* BUG: Prevent invalid array shapes in seedKevin Sheppard2017-10-182-5/+17
| | | | | | | Prevent empty arrays or arrays with more than 1 dimension from being used to seed RandomState closes #9832
* BUG: Check for NaN parameter in random.zipf.Charles Harris2017-10-062-6/+12
| | | | Avoids infinite loop.
* MAINT: Refactor rk_zipf to be more efficient.Charles Harris2017-10-051-12/+12
|
* BUG: Fix possibly undefined cast of double -> long.Yang Li2017-10-041-9/+15
| | | | | | | | | | Current double to long casting in the zipf function depends on non-standardized behavior when the double is too big to fit in a long. This is potentially dangerous and makes the code fail with tools such as AddressSanitizer. Checks are added here to prevent overflow during casting and make sure we get the desired behavior.
* MAINT,BUG: Fix mtrand for Cython 0.27.Charles Harris2017-09-251-1/+11
| | | | | | | The `import_array()` macro, that defined a C code block that included a return, was not handled correctly. The fix here is to cdef a replacement `import_array` function with a defined error return. The new function is a slight variation of the corresponding function defined by Cython.
* MAINT: fix std header include orderJulian Taylor2017-09-012-14/+16
| | | | | Removes _POSIX_C_SOURCE redefine warnings. Standard library headers should always be included last.
* DOC: Fix type definitions in mtrandKevin Sheppard2017-08-301-11/+13
| | | | | | | | Improve description of dtype requirements to correctly indicate float is supported Add required range [skip ci]
* DOC: Update release notes for noncentral_f changes.Charles Harris2017-08-271-5/+9
| | | | | | | The `dfnum` parameter is now required to be > 0 rather than the previous > 1. [ci skip]
* Merge pull request #9590 from bashtage/relax-noncentral-f-checksCharles Harris2017-08-262-7/+13
|\ | | | | ENH: Remove unnecessary restriction in noncen-f
| * ENH: Remove unnecessary restriction in noncen-fKevin Sheppard2017-08-222-7/+13
| | | | | | | | | | | | Set dfnum restriction to be > 0 as required by noncentral chisquare closes #6638
* | REF: Remove direct access to flatiter typesKevin Sheppard2017-08-222-2/+3
|/ | | | | | Replace direct access wiht Macro closes #3144
* BUG: Missing dirichlet input validationKevin Sheppard2017-08-172-0/+12
| | | | | | | | Dirichlet does not validate inputs and hangs when values are zero. Adds check that values are strictly positive as required by the distribution. closes #2089
* TST, MAINT: Add `__init__.py` files to tests directories.Charles Harris2017-08-061-0/+0
| | | | | | | | This allows pytest to run with duplicate test file names. Note that `python <path-to-test-file>` no longer works with this change, nor will a simple `pytest numpy`, because numpy is imported from the numpy repository. However, `python runtests.py` and `>>> numpy.test()` are still available.
* MAINT/DOC: Use builtin when np.{x} is builtins.{x}.Eric Wieser2017-08-051-10/+10
| | | | | | | This is the case for x in {int, bool, str, float, complex, object}. Using the np.{x} version is deceptive as it suggests that there is a difference. This change doesn't affect any external behaviour. The `long` type is missing in python 3, so np.long is still useful
* TST: Remove unittest dependencies in numpy/random/tests.Charles Harris2017-07-242-30/+32
|
* MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-041-1/+1
| | | | | | | | | | | | | | | | | The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.
* DOC: BLD: fix lots of Sphinx warnings/errors.Ralf Gommers2017-06-101-2/+2
|
* BUG: Buttress handling of extreme values in randintgfyoung2017-05-093-15/+60
|
* Merge pull request #8962 from MSeifert04/random_choice_docsEric Wieser2017-04-261-2/+2
|\ | | | | DOC: Wrong return type of np.random.choice and wrong variable name in parameter description.
| * DOC: Wrong return type of np.random.choice and wrong variable nameMichael Seifert2017-04-201-2/+2
| | | | | | | | | | | | in parameter description. [ci skip]
* | [DOC] use of * instead of ` to refer to a function parameter.Matthias Bussonnier2017-04-261-2/+2
|/ | | | | It's funny because it's fine in EXAMPLE_DOCSTRING.rst.txt that uses the same example.