| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
DOC: All integer values must be non-negative
|
| | |
|
| |
| |
| |
| | |
"All integer values must be non-negative"
|
| | |
|
|/
|
|
|
| |
Make a note on results depending on system due.
Closes gh-22919
|
|
|
|
|
|
|
|
|
|
|
| |
* DOC: add examples for random generator exponential function (Issue #22270)
* DOC: fix doc test for random exponential generator example (Issue #22270)
* DOC: fix formatting on np.random.exponential example (Issue: #22270)
* DOC: fix test and problem context on np.random.exponential example (Issue: #22270)
* DOC: use may vary instead of will vary for exponential example (Issue: #22270)
|
| |
|
|\
| |
| | |
TST: Skip when numba/numpy compat issues cause SystemError
|
| |
| |
| |
| |
| |
| |
| |
| | |
numba is a bit buggy when wrapping ufuncs, so what should be nothing
is (on non dev versions) a SystemError and not even an ImportError.
So simply catch those too, since it can be a confusing error during
dev otherwise.
|
|\ \
| | |
| | | |
MAINT: Move set_module from numpy.core to numpy._utils
|
| |/
| |
| |
| |
| | |
Note that unfortunately, compat does expose _inspect as well,
so the import remains (just the definition place moves).
|
|\ \
| | |
| | |
| | |
| | | |
BLD: enable building NumPy with Meson
[ci skip]
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This enables building with NumPy on Linux and macOS. Windows support
should be complete to, but is untested as of now and may need a few
tweaks. This contains:
- A set of `meson.build` files and related code generation script
tweaks, header templates, etc.
- One CI job on Linux
- Basic docs on using Meson to build NumPy (not yet integrated in the
html docs, it's too early for that - this is for early adopters right
now).
The build should be complete, with the major exception of SIMD support.
The full test suite passes. See gh-22546 for the tracking issue with
detailed notes on the plan for switching NumPy to Meson as its build
system.
Co-authored-by: Stefan van der Walt <stefanv@berkeley.edu>
|
|/
|
|
| |
Closes gh-22100
|
| |
|
|
|
|
|
|
|
|
| |
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)
|
|\
| |
| | |
BUG: Fix boundschecking for random.logseries
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
| |
The new weak promotion preserves the original type, this makes the
`//= 2**32` fail for certain inputs. The alternative would be
typing that as `np.int64(2**32)`, but using Python integers seems
easier and cleaner.
The code was effectively OK before, since the inputs were guaranteed
signed (or Python integers) at that point and 2**32 would have been
considered like a NumPy `int64`. (Which would be an alternative fix.)
|
| |
|
| |
|
| |
|
|
|
|
| |
xref gh-21431
|
|
|
|
|
|
|
|
|
| |
This seems to have been removed by accident in #21887
stdlib.h is required for _rotr64() further down.
Fixes:
error: call to undeclared function '_rotr64'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration]
|
|\
| |
| | |
DOC: Note symmetry requirement in `multivariate_normal` error
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
numpy.random.multivariate_normal more descriptive (closes #22140)
Issue #22140 says that numpy.random.multivariate_normal incorrectly warns that a non-symmetric positive-semidefinite matrix isn't positive-semidefinite. In the replies, there was some ambiguity over whether it was possible for a positive-semidefinite matrix to be non-symmetric, with reliable sources saying that symmetry is a common condition to add but not actually necessary. To solve this problem, two different members of the Numpy organization decided that the warning and error message "covariance is not positive-semidefinite" should be changed to "covariance is not symmetric positive-semidefinite". However, this change was never actually made yet.
Since this change only required me to change a few strings instead of actually changing the code, I've decided to skip the CI jobs.
[skip ci]
|
|/
|
|
| |
In numpy/random/tests/test_random.py, a class called TestSingleEltArrayInput had a method called test_randint that was commented out, with the instructions to uncomment it once np.random.randint was able to broadcast arguments. Since np.random.randint has been able to broadcast arguments for a while now, I uncommented the test. The only modification I made to the code was fixing a small error, where the author incorrectly tried to call "assert_equal" as a method of the TestSingleEltArrayInput instead of a function that was imported from numpy.testing. I ran runtests.py, and the new test passed.
|
|
|
|
|
| |
[ci skip]
Co-authored-by: h-vetinari <h.vetinari@gmx.com>
|
| |
|
|
|
|
| |
Fix typos and wrap length
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
DOC: Mention uniform in the np.random.Generator.random function.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
Added a See also section to mention np.random.Generator.uniform.
|
|\ \
| | |
| | | |
BLD: Allow GCC compile on mingw-w64-based systems
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Macro `__MINGW32__` always defined for Mingw-w64 compilers (32- or
64-bit):
https://sourceforge.net/p/predef/wiki/Compilers/
|
| | |
| | |
| | |
| | | |
Closes gh-21910
|
|/ /
| |
| |
| |
| | |
Add the voltbl fix to librandom. Remove SSE flag for GCC on 32-bit
Windows, it's the default.
|
|/
|
| |
Co-authored-by: Bram <b.t.ton@saxion.nl>
|
|
|
|
|
|
|
|
|
| |
The meaning of the second argument in the mathematical notation
N(mu, b) for the normal distribution is not consistent. In some
references it is the variance while in others it is the standard
deviation. Let's avoid the ambiguity by not using the notation.
Fixes #21296
|
|
|
|
|
|
|
| |
* Disallow both mean and cov from being complex.
* Raise a TypeError instead of a NotImplementedError if mean or cov is
complex.
* Expand and fix the unit test.
|
|
|
|
|
| |
This commit disallows complex covariances in multivariate_normal
as passing them can silently lead to incorrect results.
|
| |
|