| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Changed alpha value error to pass a null value. This way, dirichlet function (on the generator, not mtrand) won't raise a value exception at 0. Also added test.
|
| |
|
|
|
|
|
|
|
|
| |
In some cases, the replacement is clearly not what is intended,
in those (where setup was called explicitly), I mostly renamed
`setup` to `_setup`.
The `test_ccompile_opt` is a bit confusing, so left it right now
(this will probably fail)
|
|
|
|
|
|
|
|
| |
Logseries previously did not enforce bounds to be strictly exclusive
for the upper bound, where it leads to incorrect behavior.
The NOT_NAN check is removed, since it was never used: The current bounded
version always excludes NaNs.
|
|
|
|
|
|
|
| |
Add a new version or seed that supports seeding any bit gen
Add set/get_bit_generator as explicity methodds to support swapping
closes #21808
|
| |
|
|
|
|
|
|
|
| |
Allow bit generators to supply their own constructors to enable Generator
objects using arbitrary bit generators to be supported
closes #22012
|
| |
|
|
|
|
|
|
|
|
| |
Apply vonmises fix only to Generator
Add tests for correctness
closes #17378
closes #17275
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This would trigger:
```
NotImplementedError: Axis argument is only supported on ndarray objects
```
because empty arrays and array scalars would take the "untyped" path.
The bug exists only for Generator, not in RandomState (it doesn't have
axis keyword for `shuffle`), but update both because it keeps
implementations in sync and the change results in more understandable
code also for RandomState.
|
|
|
|
|
|
|
|
|
| |
Tests using MD5 algorithms fail in FIPS Mode because MD5 is not FIPS
compliant.
Replace MD5 with SHA256 to overcome that.
Signed-off-by: Nikola Forró <nforro@redhat.com>
|
|
|
|
|
|
| |
Check that size is not being broadcast
closes #16833
|
| |
|
|
|
|
|
|
|
| |
Add repeatability tests for when the range of the integers is `2**32`
(and `2**32 +/- 1` for good measure) with broadcasting. The underlying
functions called by Generator.integers and random.randint when the
inputs are broadcast are different than when the inputs are scalars.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Relates to gh-6103
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixing segfault error in np.random.permutation(x) where x is str
* removed whitespace
* changing error type to ValueError
* changing error type to ValueError
* changing error type to ValueError
* tests
* changed error to IndexError for backward compatibility with numpy 1.16
* fixes numpy.randomstate.permutation segfault too
* Rolled back to ValueError for Generator.permutation() for all 0-dimensional
* fixes refuige erro and rolls backs to AxisError
|
| |
|
| |
|
|
|
| |
* test, fix random.choice sum for non-contiguous
|
|
|
|
|
|
| |
* DOC, MAINT: Misc. typo fixes
Found via `codespell`
|
| |
|
|
|
|
|
|
| |
Use type-dependent poisson lam max
Make private
Fix backward compat issue in loggam
|
|
|
|
|
|
| |
Ensure integer type is stream compatible on 32 bit
Fix incorrect clause end
Add integer-generator tests that check long streams
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
remove numpy.random.gen, BRNG.generator, pcg*, rand, randn
remove use_mask and Lemire's method, fix benchmarks for PCG removal
convert brng to bitgen (in C) and bit_generator (in python)
convert base R{NG,andom.*} to BitGenerator, fix last commit
randint -> integers, remove rand, randn, random_integers
RandomGenerator -> Generator, more "basic RNG" -> BitGenerator
random_sample -> random, jump -> jumped, resync with randomgen
Remove derived code from entropy
Port over changes accepted in upstream to protect log(0.0) where relevant
fix doctests for jumped, better document choice
Remove Python 2.7 shims
Use NPY_INLINE to simplify
Fix performance.py to work
Renam directory brng to bit_generators
Fix examples wiht new directory structure
Clarify relationship to historical RandomState
Remove references to .generator
Rename xoshiro256/512starstar
|
|
|
|
| |
Add closed option to randint to simplify some cases
|
|
|
|
| |
Case high to a Python int to avoid overflow from NumPy types
|
|
|
|
|
|
| |
Extend multinomial to allow broadcasting
Fix zipf changes missed in NumPy
Enable 0 as valid input for hypergeometric
|
|
remove files that were part of the origal repo
rework randomgen docs to integrate with numpy and fix some links
remove convenience functions, require explicit call to gen.brng
move code out of numpy.random.randomgen into numpy.random
|