summaryrefslogtreecommitdiff
path: root/numpy/random
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18439 from WarrenWeckesser/random-choice-excCharles Harris2021-03-071-4/+6
|\ | | | | MAINT: random: Use 'from exc' when raising a ValueError in choice.
| * MAINT: random: use 'from exc' instead of 'from None'; tweak error messages.Warren Weckesser2021-02-191-7/+7
| |
| * MAINT: random: Use 'from None' when raising a ValueError in choice.Warren Weckesser2021-02-181-3/+5
| | | | | | | | | | | | | | | | Use 'from None' when the ValueError is raised when the first argument to `choice` is not an array and not an integer. Also fix the error message for the ValueError, and add a missing space to two other error messages.
* | Port error to RandomStateKevin Sheppard2021-02-263-2/+23
| |
* | Address commentsKevin Sheppard2021-02-261-9/+9
| |
* | Accept suggestion Kevin Sheppard2021-02-261-1/+2
| | | | | | | | | | Use if else. Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* | ENH: Improve error message in multinomialKevin Sheppard2021-02-262-1/+21
| | | | | | | | | | | | | | | | Improve error message when the sum of pvals is larger than 1 when the input data is an ndarray closes #8317 xref #16732
* | CLN: Move to legacy functionKevin Sheppard2021-02-264-20/+82
| | | | | | | | | | | | Avoid conditional compilation and move old version to legacy_vonmises Small clean up Additional comments
* | BUG: Prevent RandomState from changingKevin Sheppard2021-02-266-19/+45
| | | | | | | | | | | | | | | | Apply vonmises fix only to Generator Add tests for correctness closes #17378 closes #17275
* | Added test for [-np.pi, np.pi] range for the von mises distribution using ↵Raúl Montón Pinillos2021-02-263-0/+9
| | | | | | | | large values of kappa (>1e6)
* | Fixed style and added check for bounds in [-pi,pi] interval.Raúl Montón Pinillos2021-02-261-6/+17
| |
* | Fixed Von Mises distribution for big values of kappa by falling back to a ↵Raúl Montón Pinillos2021-02-261-3/+8
| | | | | | | | normal distribution (which the von mises distribution converges to).
* | Merge pull request #18433 from bashtage/randomstate-typingMatti Picus2021-02-245-130/+824
|\ \ | | | | | | ENH: Add typing for RandomState
| * | BUG: Remove incorrect variable nameKevin Sheppard2021-02-241-1/+0
| | | | | | | | | | | | Remove incorrect variable name in randint
| * | CLN: Clean up random typingKevin Sheppard2021-02-242-22/+7
| | | | | | | | | | | | | | | Clean unnecessary definitions Fix small typing errors
| * | Use {int_} for int return typesKevin Sheppard2021-02-241-1/+1
| | |
| * | Small fixesKevin Sheppard2021-02-243-7/+4
| | |
| * | BUG: Fix typing bugsKevin Sheppard2021-02-241-1/+1
| | |
| * | ENH: Add tests for RandomStateKevin Sheppard2021-02-241-4/+6
| | |
| * | BUG: Corect typing statements in mtrandKevin Sheppard2021-02-242-27/+64
| | | | | | | | | | | | | | | Bring over changes from Generator to RandomState where appropriate Remove attributes not in RandomState
| * | ENH/BUG: Improve definitions and fix bugsKevin Sheppard2021-02-241-33/+131
| | | | | | | | | | | | | | | | | | Add tests Fix related bugs Improve specificity of definitions
| * | ENH/BUG: Add tests and correct typing issuesKevin Sheppard2021-02-244-31/+61
| | | | | | | | | | | | | | | | | | | | | Add tests for lower level components Correct errors found in testing Improve specificity of tests Other small fixes to docs and typing
| * | MAINT: Restructure imports in pyi fileKevin Sheppard2021-02-241-51/+53
| | |
| * | ENH: Add typing for RandomStateKevin Sheppard2021-02-243-61/+605
| | | | | | | | | | | | | | | Add typing for RandomState Small fixes to Generator's typing
* | | DOC: Explaing differences in code paths in choiceKevin Sheppard2021-02-242-0/+10
| | | | | | | | | | | | | | | | | | | | | Add explanation for different results when using user-specified probabilities even if uniform closes #18172
* | | DOC: Correct poisson docstringKevin Sheppard2021-02-242-4/+6
|/ / | | | | | | closes #18314
* | Merge pull request #18372 from lelayf/random-standard_t-docCharles Harris2021-02-232-30/+54
|\ \ | | | | | | DOC: improve standard_t example in numpy.random.
| * \ Merge branch 'master' into random-standard_t-docFrançois Le Lay2021-02-1712-29/+828
| |\ \ | | |/
| * | Remove poorly cited referenceFrançois Le Lay2021-02-122-24/+16
| | | | | | | | | | | | | | | Clarify point about std computation Use absolute value for p-value computation of 2-tailed test
| * | DOC: improve standard_t example in numpy.random.François Le Lay2021-02-082-28/+60
| | | | | | | | | | | | | | | | | | This rewrite better reflects the cited reference R example by offering a 2-tailed test and more accurate language. Closes #18370.
* | | TST: Add test for shuffle warning and assert stacklevelSebastian Berg2021-02-191-0/+12
| | | | | | | | | | | | | | | | | | | | | The test checks that the warning originates in the correct file (test_random.py). I am not quite sure how safe the test is, though. Unfortunately, there is no "obvious" way to test stacklevels.
* | | BUG: fix stacklevel in warning within random.shuffleSebastian Berg2021-02-192-10/+12
| | | | | | | | | | | | | | | Cython does _not_ add a new stacklevel (at least at this time), so `stacklevel=1` (or ommiting it) is, maybe surprisingly, correct.
* | | MAINT: Correct code producing warningsKevin Sheppard2021-02-181-1/+1
| |/ |/| | | | | | | Cast to avoid warnings Correct function
* | ENH: Reorder bool and add scalar bool for integersKevin Sheppard2021-02-161-9/+18
| |
* | ENH: Add overloads to integersKevin Sheppard2021-02-151-7/+121
| |
* | ENH: Fix abstract integer useKevin Sheppard2021-02-151-2/+19
| | | | | | | | Replace with concrete types
* | ENH: Fix typingKevin Sheppard2021-02-151-2/+2
| | | | | | | | Correct specific typing and general typing
* | ENH: Update typingKevin Sheppard2021-02-151-2/+10
| | | | | | | | Update with latest suggestions
* | ENH: Add overloadsKevin Sheppard2021-02-135-55/+192
| |
* | ENH: Fix additional missed typesKevin Sheppard2021-02-131-8/+17
| |
* | ENH: More typingKevin Sheppard2021-02-131-82/+102
| |
* | ENH: Update with TypedDictKevin Sheppard2021-02-136-28/+53
| | | | | | | | Update using TypedDict for state
* | ENH: Add typing for GeneratorKevin Sheppard2021-02-134-8/+253
| |
* | ENH: Add typing for MT19937 and PhiloxKevin Sheppard2021-02-136-61/+92
| | | | | | | | | | Add typing for remaining core bit generators Clean up remaining files
* | ENH: Add typing for PCG64 and SFC64Kevin Sheppard2021-02-133-16/+107
| | | | | | | | Add initial typing for select bit generators
* | MAINT: Improve typing of BitGeneratorKevin Sheppard2021-02-132-19/+50
| | | | | | | | | | Fix initial bugs Add _Interface named tuple
* | ENH: Initial typing of randomKevin Sheppard2021-02-132-2/+62
| | | | | | | | Add typing to the lowest-level building blocks on random
* | MAINT: Remove unicode markersKevin Sheppard2021-02-113-7/+7
| | | | | | | | Remove unnecessary unicode markers (u"")
* | MAINT: Remove dummy_threadingKevin Sheppard2021-02-112-9/+1
| | | | | | | | Threading is guaranteed to be supported in Python 3.7+
* | BUG: Remove check in shuffle for non-ndarraysKevin Sheppard2021-02-112-1/+11
|/ | | | | | Remove ndim for non-ndarrays and check axis is 0 closes #18142