| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
BUG: Add `__array_api_version__` to `numpy.array_api` namespace
|
| | | | | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / / / / / /
|/| | | | | | | | | | | | | |
TST,TYP: Bump mypy to 0.981
|
| |/ / / / / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
ENH,TYP: Add special casing for `ndarray`-based indexing
|
| |/ / / / / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
DOC: Change in the documentation for chebpts2 method
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
| | | | | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
| |_|_|/ / / / / / / / / / /
|/| | | | | | | | | | | | | |
TYP,ENH: Mark `numpy.typing` protocols as runtime checkable
|
| | |/ / / / / / / / / / /
| |/| | | | | | | | | | | |
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Some BaseExceptions (at least the Skipped that pytest uses) need to
be caught as well. It seems easiest to be practical and keep ignoring
almost all exception in this particular code path.
Effectively reverts parts of gh-19393
Closes gh-22345
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Update return description to account for case when axis is a tuple
of integers, noting the shape of the returned array.
|
|/ / / / / / / / / / / /
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Co-authored-by: Tyler Reddy <tyler.je.reddy@gmail.com>
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
|\ \ \ \ \ \ \ \ \ \ \ \
| |_|_|_|_|/ / / / / / /
|/| | | | | | | | | | | |
DOC: fix linalg.tensorsolve docstring
|
| | | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
DOC: fixed two more typos in docstrings
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
nanpercentile and nanquantile had the same typo I just fixed in percentile
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
* DOC: Make converters param description more concise.
A wording proposal to hopefully make the description of the
converters parameter of loadtxt more clear, and direct readers
to the example section.
* DOC: Combine both suggestions for param descr.
|
|/ / / / / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
ENH: Vectorize FP16 umath functions using AVX512
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | |_|_|/ / / / / / / /
| |/| | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \
| |_|_|_|_|/ / / / / / /
|/| | | | | | | | | | | |
DOC: Add example to np.prod
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
| | |_|/ / / / / / / /
| |/| | | | | | | | | |
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
finfo() and iinfo() both have a dtype attribute, which was undocumented before this commit.
[skip azp] [skip actions]
Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
|
| |/ / / / / / / / /
|/| | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* Add examples to ma.max function
* indent fix
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* Indententation fixes
* Indent fixes
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* Indent fixes
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* Added example that gives masked array
* fix output indent
* Update numpy/ma/core.py
* Update numpy/ma/core.py
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* DOC: examples for np.char.isdecimal and np.char.isnumeric (See #22267)
* DOC: fix formatting np.char function example (See #22267)
* DOC: remove non-array input examples (See #22267)
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
DOC: updated the description for array-like type in histogramdd (#19823)
|
| |/ / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
SIMD: Improve the performance of NEON vector initializer
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Using load over stack has a bad impact on the compiler static analysis
compared with direct compiler initlizer via curly brace which
is supported by both gcc and clang.
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
ENH: Implement essential intrinsics required by the upcoming SIMD optimizations(0)
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
npyv_any_##SFX: returns true if any of the elements is not equal to zero
npyv_all_##SFX: returns true if all elements are not equal to zero
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
max/min that reverse IEC 60559's NaN beahvior(propagates NaNs) for float data types
npyv_maxn_##SFX
npyv_minn_##SFX
max/min reduction for all float and integer vector data types
npyv_reduce_max_##SFX
npyv_reduce_min_##SFX
max/min reduction supports IEC 60559 for float data types
npyv_reduce_maxp_##SFX
npyv_reduce_minp_##SFX
max/min reduction reverse IEC 60559's NaN beahvior(propagates NaNs) for float data types
npyv_reduce_maxn_##SFX
npyv_reduce_minn_##SFX
also, this patch implements new intrinsics to extract the first vector lane:
npyv_extract0_##SFX
npyv_extract0_##SFX
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
TST: add functional tests for kron
|
| | |_|/ / / / / / / / /
| |/| | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
BUG: Fix complex vector dot with more than NPY_CBLAS_CHUNK elements
|
| | |_|_|_|_|/ / / / / /
| |/| | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
The iteration was simply using the wrong value, the larger value
might even work sometimes, but then we do another iteration counting
the remaining elements twice.
Closes gh-22262
|
|\ \ \ \ \ \ \ \ \ \ \ \
| |_|_|_|/ / / / / / / /
|/| | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Developer-Ecosystem-Engineering/improve_tanh_for_apple_silicon
ENH: Improve tanh for architectures without efficient gather/scatter …
|
| | | | | | | | | | | | |
|
| | |_|_|_|_|/ / / / /
| |/| | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
instructions
NumPy implements tanh with a lookup table that isn't setup well for Apple silicon. Transposing the lookup table makes it more efficient to load all coefficients of the polynomial.
- float32: 1.8x faster
- float64: 1.3x faster
Apple M1 native (arm64):
```
before after ratio
[7c143834] [c3762e7a]
<main> <tanh/upstream-pr>
- 564±2μs 491±2μs 0.87 bench_ufunc.UFunc.time_ufunc_types('tanh')
- 410±0.04μs 324±0.03μs 0.79 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 1, 1, 'd')
- 429±0.2μs 336±0.3μs 0.78 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 1, 2, 'd')
- 450±0.05μs 350±0.1μs 0.78 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 2, 2, 'd')
- 452±0.3μs 352±0.8μs 0.78 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 4, 2, 'd')
- 432±0.5μs 335±0.5μs 0.78 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 2, 1, 'd')
- 435±0.8μs 337±1μs 0.77 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 4, 1, 'd')
- 466±0.2μs 360±0.5μs 0.77 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 2, 4, 'd')
- 444±0.3μs 343±0.3μs 0.77 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 1, 4, 'd')
- 467±0.3μs 359±0.3μs 0.77 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 4, 4, 'd')
- 237±0.1μs 147±0.03μs 0.62 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 4, 4, 'f')
- 230±0.4μs 143±0.2μs 0.62 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 4, 2, 'f')
- 224±0.1μs 138±0.8μs 0.61 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 2, 4, 'f')
- 199±0.2μs 122±1μs 0.61 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 1, 2, 'f')
- 216±0.6μs 131±0.2μs 0.61 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 2, 2, 'f')
- 208±0.4μs 125±0.3μs 0.60 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 1, 4, 'f')
- 203±0.3μs 120±0.9μs 0.59 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 2, 1, 'f')
- 216±0.7μs 125±0.03μs 0.58 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 4, 1, 'f')
- 190±0.04μs 110±0.06μs 0.58 bench_ufunc_strides.Unary.time_ufunc(<ufunc 'tanh'>, 1, 1, 'f')
```
|
| | | | | | | | | | | |
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Currently the location of the function definition is always reported
to be `numpy.lib.utils`; this changes it to be the location of the
actual definition when possible.
|
| |/ / / / / / / / /
|/| | | | | | | | | |
|