| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | | |
Co-authored-by: Sayed Adel <seiko@imavr.com>
|
| | | |
| | | |
| | | | |
Co-authored-by: Sayed Adel <seiko@imavr.com>
|
| | | |
| | | |
| | | | |
Co-authored-by: Sayed Adel <seiko@imavr.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
NumPy has SIMD versions of BOOL `logical_and`, `logical_or`, `logical_not`, and `absolute` for SSE2. The changes here replace that implementation with one that uses their universal intrinsics. This allows other architectures to have SIMD versions of the functions too.
BOOL `logical_and` and `logical_or` are particularly important for NumPy as that's how `np.any()` / `np.all()` are implemented.
|
|\ \ \ \
| | | | |
| | | | | |
MAINT: remove unnecessary forward declaration of _convert_from_any
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was due to a cross-merge conflict. gh-22679 added a new file
to the setup.py build, while the Meson build got merged. It's
a file that only does anything on arm64 macOS, hence it wasn't
noticed in CI.
Addresses a "missing `npy_asinh`" problem discussed in gh-22796
[skip azp]
[skip circle]
[skip cirrus]
|
|\ \ \ \
| | | | |
| | | | | |
BUG: Fix refcounting errors found using pytest-leaks
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
These are the clear errors I found based on pytest-leaks. One day
it would be nice to fix up pytest-leaks to better support newer
versions of pytest and cleaning up fixtures...
|
|/ / / /
| | | |
| | | |
| | | | |
There should be more tests for this, but this now passes.
|
|\ \ \ \
| | | | |
| | | | | |
MAINT: elaborate on error message for unaligned casting spec
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
BUG: Ensure arguments to npy_floatstatus_..._barrier() can be dereferenced
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
is in bounds.
The argument is dereferenced, even if the value is thrown away.
AddressSanitizer reports an error on the dereference for these functions
when running the NumPy test suite.
It's unclear to me whether this is a legal fix or not, or whether we
need to work harder to find a valid pointer that points within one of the
arrays. This depends deeply on the semantics of `volatile` in C and I'm
not 100% sure.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
BUG: Fix infinite recursion in longdouble/large integer scalar ops
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
A smal bug snuck in when implementing NEP 50 weak-scalar logic,
and unfortunately the tests didn't cover that specific path :/.
closes gh-22787
|
|/ / /
| | |
| | |
| | | |
The first one should have been removed in gh-22735, the second an even more
random find.
|
|\ \ \
| | | |
| | | | |
MAINT: allow unsized NEP 42 user-defined dtypes
|
| | |/
| |/| |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Examples in documentation for trapz goes straight from integrating random arrays to parametric curves. I think it's worth pointing out one can integrate something they'd see in Calculus 1 and get the answer they'd expect.
Also add some more guidance text to the existing examples (and style fixes)
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Co-authored-by: Melissa Weber Mendonça <melissawm@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since percentile is more or less identical to quantile, I also made it
throw an error if it receives a complex input. I also made nanquantile
and nanpercentile throw errors as well.
* Made the changes recommended by seberg
* Fixed a test for PR 22703
* Fixed tests for quantile
* Shortened some more lines
* Fixup more lines
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
np.pad with mode="wrap" returns unexpected result that original data is not strictly looped in padding. This may happen in some occassions when padding widths in the same dimension are unbalanced (see added testcase in test_arraypad.py and the related issue). The reason is the function pad makes iterative calls of _set_wrap_both() in the above situation, yet period for padding is not correctly computed in each iteration.
The bug is fixed by guaranteeing that period is always a multiple of original data size, and also be the possible maximum for computation efficiency.
Closes #22464
Co-authored-by: Lars Grüter <lagru+github@mailbox.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The deepcopy cleanup on error did not clean up everything in all
code paths. Our test do excercise the path, but leak checking
is necessry to see the issue.
Making a single PR, since it is a bit larger change.
|
|\ \
| | |
| | | |
BUG, SIMD: Fix rounding large numbers on SSE2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before SSE41, there were no native instructions for rounding
operations on double precision. We usually emulate it by assuming
that the `MXCR` register is set to rounding, adding a
large number `2^52` to `X` and then subtracting it back to
eliminate any excess precision as long as `|X|` is less than `2^52`
otherwise returns `X.`
The current emulated intrinics `npyv_[rint,floor, ceil, trunc]_f64`
was not checking whether `|x|` equal or large `2^52` which leads
to losing accuracy on large numbers.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Add reshape differences to the array API compat document
* Add an item to the array API compat document about reverse broadcasting
* Make some wording easier to read
|
|\ \ \
| |_|/
|/| | |
API: Hide exceptions from the main namespace
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I wasn't sure if we should already start deprecating the exceptions
so opted to follow up with only hiding them from `__dir__()` but
still having them in `__all__` and available.
This also changes their module to `numpy.exceptions`, which matters
because that is how they will be pickled (it would not be possible
to unpickle such an exception in an older NumPy version).
Due to pickling, we could put off changing the module.
|
|\ \ \
| |/ /
|/| | |
DOC: Improve description of the dtype parameter in np.array docstring
|
| |/ |
|
|\ \
| | |
| | | |
BUG: `keepdims=True` is ignored if `out` is not `None` in `numpy.median`.
|
| | |
| | |
| | |
| | |
| | |
| | | |
`numpy.percentile()`, and `numpy.quantile()`.
Closes #22714, #22544.
|
|\ \ \
| | | |
| | | | |
BENCH: Update MaskedArray Benchmarks
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
ENH: Add SIMD versions of negative
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|