summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | | Merge pull request #22365 from honno/xp-versionCharles Harris2022-10-021-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG: Add `__array_api_version__` to `numpy.array_api` namespace
| * | | | | | | | | | | | | Add `__array_api_version__` to `numpy.array_api` namespaceMatthew Barber2022-10-021-1/+3
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #22360 from BvB93/mypyMatti Picus2022-10-023-4/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / |/| | | | | | | | | | | | | TST,TYP: Bump mypy to 0.981
| * | | | | | | | | | | | | TST,TYP: Bump mypy to 0.981BvB932022-09-303-4/+2
| |/ / / / / / / / / / / /
* | | | | | | | | | | | | Merge pull request #22358 from BvB93/indexMatti Picus2022-10-022-2/+8
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENH,TYP: Add special casing for `ndarray`-based indexing
| * | | | | | | | | | | | | ENH,TYP: Add special casing for `ndarray`-based indexingBvB932022-09-302-2/+8
| |/ / / / / / / / / / / /
* | | | | | | | | | | | | Merge pull request #22302 from shashank140195/GHC22Charles Harris2022-10-011-1/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOC: Change in the documentation for chebpts2 method
| * | | | | | | | | | | | | DOC: Revert formula change, add note about order.Ross Barnowski2022-09-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
| * | | | | | | | | | | | | DOC: Change in the documentation for chebpts2 methodShashank Gupta2022-09-161-1/+1
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #22357 from BvB93/runtimeCharles Harris2022-10-014-3/+40
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / / |/| | | | | | | | | | | | | TYP,ENH: Mark `numpy.typing` protocols as runtime checkable
| * | | | | | | | | | | | | TYP,ENH: Mark `numpy.typing` protocols as runtime checkableBvB932022-09-304-3/+40
| | |/ / / / / / / / / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | REV: Losen `lookfor`'s import try/except again (#22356)Sebastian Berg2022-09-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | | | | DOC: Update amin/amax return description. (#22362)Muhammad Jarir Kanji2022-09-301-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update return description to account for case when axis is a tuple of integers, noting the shape of the returned array.
* | | | | | | | | | | | | DOC: add examples to numpy.char.replace (#22308)Simran Makandar2022-09-301-0/+9
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | | | Merge pull request #22147 from eelregit/eelregit_tensorsolve_doc_fixSebastian Berg2022-09-301-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / / / |/| | | | | | | | | | | DOC: fix linalg.tensorsolve docstring
| * | | | | | | | | | | Fix linalg.tensorsolve docstringYin Li2022-08-181-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #22343 from gdementen/patch-2Charles Harris2022-09-281-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | DOC: fixed two more typos in docstrings
| * | | | | | | | | | | | DOC: fixed two more typos in docstringsGaëtan de Menten2022-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nanpercentile and nanquantile had the same typo I just fixed in percentile
* | | | | | | | | | | | | DOC: Improve `converters` parameter description for loadtxt (#22254)Ross Barnowski2022-09-281-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | | | | | | | | | | | DOC: fixed minor typo in percentile docstringGaëtan de Menten2022-09-281-1/+1
|/ / / / / / / / / / / /
* | | | | | | | | | | | Merge pull request #21955 from r-devulap/fp16-umathMatti Picus2022-09-284-41/+108
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | ENH: Vectorize FP16 umath functions using AVX512
| * | | | | | | | | | | | BUG: Add memoverlap checkRaghuveer Devulapalli2022-09-261-7/+6
| | | | | | | | | | | | |
| * | | | | | | | | | | | MAINT: Move AVX512 fp16 universal intrinsic to dispatch fileRaghuveer Devulapalli2022-09-264-39/+19
| | | | | | | | | | | | |
| * | | | | | | | | | | | ENH: Vectorize FP16 math functions on Intel SkylakeXRaghuveer Devulapalli2022-09-264-38/+87
| | | | | | | | | | | | |
| * | | | | | | | | | | | SIMD: Add universal intrinsic support for SIMD float16 using AVX-512Raghuveer Devulapalli2022-09-263-0/+39
| | |_|_|/ / / / / / / / | |/| | | | | | | | | |
* | | | | | | | | | | | Merge pull request #22297 from sanjanamm98/np.prod-example-issue#22266Sebastian Berg2022-09-281-3/+6
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / / / |/| | | | | | | | | | | DOC: Add example to np.prod
| * | | | | | | | | | | DOC: Apply Chuck's suggestion.Ross Barnowski2022-09-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
| * | | | | | | | | | | Added example to np.prodSanjana M Moodbagil2022-09-161-0/+3
| | |_|/ / / / / / / / | |/| | | | | | | | |
* | | | | | | | | | | DOC: Added missing dtype attribute to `iinfo` and `finfo` docstring (#22334)Matteo Raso2022-09-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | | DOC: Adding examples to `ma.max` function (#22331)Felix Hirwa Nshuti2022-09-271-0/+37
| |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: Add copyto example (#22292)dg31922022-09-261-0/+16
| | | | | | | | | |
* | | | | | | | | | DOC: examples for `np.char.isdecimal` and `np.char.isnumeric` (#22300)lzha972022-09-261-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* | | | | | | | | | Merge pull request #22280 from xilin22/histogramdd-doc-updateSebastian Berg2022-09-261-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | DOC: updated the description for array-like type in histogramdd (#19823)
| * | | | | | | | | | DOC: updated the description for array-like type in histogramddXinRu Lin2022-09-161-1/+1
| |/ / / / / / / / /
* | | | | | | | | | Merge pull request #22325 from seiko2plus/npyv_speedup_neon_vec_initSebastian Berg2022-09-261-80/+88
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SIMD: Improve the performance of NEON vector initializer
| * | | | | | | | | | SIMD: Improve the performance of NEON vector initializerSayed Adel2022-09-251-80/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | | | Merge pull request #22306 from seiko2plus/npyv_new_intrinsics_sep2022_vol0Matti Picus2022-09-2521-251/+1276
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ENH: Implement essential intrinsics required by the upcoming SIMD optimizations(0)
| * | | | | | | | | | | SIMD: Add new intrinsics to check true cross all vector lanesSayed Adel2022-09-1914-122/+557
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | | | | | MAINT, SIMD: remove local implementation of max/min reduce intrinsicsSayed Adel2022-09-172-104/+6
| | | | | | | | | | | |
| * | | | | | | | | | | ENH, SIMD: Implement new universal intrinsic for max/min operationsSayed Adel2022-09-1713-142/+830
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | | Merge pull request #22319 from sjtechdev/21257/add_kron_functional_testsCharles Harris2022-09-221-0/+29
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | TST: add functional tests for kron
| * | | | | | | | | | | | TST: add functional tests for kronShreyas Joshi2022-09-211-0/+29
| | |_|/ / / / / / / / / | |/| | | | | | | | | |
* | | | | | | | | | | | Merge pull request #22327 from seberg/issue22262Charles Harris2022-09-222-2/+12
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | BUG: Fix complex vector dot with more than NPY_CBLAS_CHUNK elements
| * | | | | | | | | | | | BUG: Fix complex vector dot with more than NPY_CBLAS_CHUNK elementsSebastian Berg2022-09-222-2/+12
| | |_|_|_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | | Merge pull request #22164 from ↵Sebastian Berg2022-09-221-0/+253
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer-Ecosystem-Engineering/improve_tanh_for_apple_silicon ENH: Improve tanh for architectures without efficient gather/scatter …
| * | | | | | | | | | | Remove unused portion per requestDeveloper-Ecosystem-Engineering2022-08-291-16/+0
| | | | | | | | | | | |
| * | | | | | | | | | | ENH: Improve tanh for architectures without efficient gather/scatter ↵Developer-Ecosystem-Engineering2022-08-231-0/+269
| | |_|_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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') ```
* | | | | | | | | | | MAINT: use `functools.wraps` in `np.deprecate`Josh Wilson2022-09-211-16/+5
| | | | | | | | | | |
* | | | | | | | | | | MAINT: update function's `__module__` attribute in `deprecate`Josh Wilson2022-09-212-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | | | MAINT: core: Fix a typo in a datetime error message.warren2022-09-211-1/+1
| |/ / / / / / / / / |/| | | | | | | | |