| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
BUG: Use 2GiB chunking code for fwrite() on mingw32/64
|
| | |
| |
| |
| | |
Addresses #2256
|
| |\ \
| | |
| | | |
ENH: Allow, and default to, downstream building with old API
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have three choices:
1. Be compatible with limited API (oldest supported Python version)
2. Be compatible with everything on the same Python version (this)
3. Be strict and default to NEP 29
This just rephrases things to be 2. Because our API version was not
bumped over the relevant time frame, it is actually also compatible
with the first.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The default compiles compatibly with 1.17.x, we allow going back to
1.15 (mainly because it is easy).
There were few additions in this time, a few structs grew and very
few API functions were added. Added a way to mark API functions
as requiring a specific target version.
If a user wishes to use the *new* API, they have to add the definition:
#define NPY_TARGET_VERSION NPY_1_22_API_VERSION
Before importing NumPy. (Our version numbering is a bit funny
I first thought to use a hex version of the main NumPy version,
but since we already have the `NPY_1_22_API_VERSION` defines...)
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a way for downstream users to specify which NumPy version
they wish to be compaible with.
Note that we provide a conservative default here (because almost nobody
actually uses new API as they would lose backwards compatibility).
Initially I had thought we should just redefine it so that the target
version uses the same scheme as the Python hex version (and limited API),
but since we have `NPY_1_15_API_VERSION` defines, use those...
This commit does not include any actual use of this!
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This takes the [sin](https://github.com/ARM-software/optimized-routines/blob/master/math/v_sin.c) and [cos](https://github.com/ARM-software/optimized-routines/blob/master/math/v_cos.c) algorithms from Optimized Routines under MIT license, and converts them to Numpy intrinsics.
The routines are within the ULP boundaries of other vectorised math routines (<4ULP). The routines reduce performance in some special cases but improves normal cases. Comparing to the SVML implementation, these routines are more performant in special cases, we're therefore safe to assume the performance is acceptable for AArch64 as well.
| performance ratio (lower is better) | benchmark |
| ---- | ---- |
| 1.8 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 4 2 'd') |
| 1.79 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 4 4 'd') |
| 1.77 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 4 1 'd') |
| 1.74 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 2 2 'd') |
| 1.74 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 2 4 'd') |
| 1.72 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 2 1 'd') |
| 1.6 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 1 2 'd') |
| 1.6 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 1 4 'd') |
| 1.56 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'cos'> 1 1 'd') |
| 1.42 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 2 2 'd') |
| 1.41 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 2 4 'd') |
| 1.37 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 2 1 'd') |
| 1.26 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 4 2 'd') |
| 1.26 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 4 4 'd') |
| 1.2 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 4 1 'd') |
| 1.18 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 1 2 'd') |
| 1.18 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 1 4 'd') |
| 1.12 | bench_ufunc_strides.UnaryFPSpecial.time_unary(<ufunc 'sin'> 1 1 'd') |
| 0.65 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 4 2 'd') |
| 0.64 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 2 4 'd') |
| 0.64 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 4 4 'd') |
| 0.64 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 2 2 'd') |
| 0.61 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 1 4 'd') |
| 0.61 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 1 2 'd') |
| 0.6 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 2 1 'd') |
| 0.6 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 4 1 'd') |
| 0.56 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'cos'> 1 1 'd') |
| 0.52 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 4 2 'd') |
| 0.52 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 4 4 'd') |
| 0.52 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 2 4 'd') |
| 0.52 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 2 2 'd') |
| 0.47 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 1 4 'd') |
| 0.47 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 1 2 'd') |
| 0.46 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 4 1 'd') |
| 0.46 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 2 1 'd') |
| 0.42 | bench_ufunc_strides.UnaryFP.time_unary(<ufunc 'sin'> 1 1 'd') |
Co-authored-by: Pierre Blanchard <Pierre.Blanchard@arm.com>
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| | |
ENH: add support for fujitsu C/C++ compiler and SSL2 to numpy.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Moves some #defines from public to private headers. Also checks for invalid
slots between the maximum dtype slot and miminum arrfuncs slot
Also moves get_clear_function to a spot where it and only it can be made public
|
| |\ \
| | |
| | | |
SIMD: Get rid of attribute-based CPU dispatching
|
| | | | |
|
| |\ \ \
| | | |
| | | | |
ENH: add `_is_numeric` attribute for DType classes
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | |/ /
|/| |
| | |
| | | |
call fails
|
| |/ / |
|
| |/
|
|
|
|
|
|
| |
This merges header definitions that are private (enough) so that
we use the same definitions within NumPy as externally made available
through the experimental dtype API header.
Tested with string and mpfdtype from the experimental dtype API.
|
| | |
|
| | |
|
| |
|
|
| |
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
| | |
|
| | |
|
| |
|
|
|
| |
Its a new version (it changed ;)), plus I took the liberty to move
things around a bit ABI wise.
|
| |
|
|
| |
value
|
| |
|
|
|
| |
Need to look into whether to cut out the dynamic discovery of
reorderability though.
|
| | |
|
| |
|
|
|
| |
Also add it to the wrapped array-method (ufunc) implementation
so that a Unit dtype can reasonably use an identity for reductions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow up to gh-22679 which addressed gh-22673.
The main thing is that we want the functions to be available after
importing NumPy, so they need to be part of multiarray.
However, `npymath` is a static library, so the symbols are not really
exported there. The former PR did actually work in practice but this
seems like it is technically the right place?
For some reason, I had to add nextafter to be able to do:
from scipy.spatial.distance import euclidean
with the SciPy 1.9.3 wheels. SciPy test collection works with this for
the 1.9.3 wheel, so this should be all the symbols hopefully.
|
| |
|
|
|
|
|
|
|
|
| |
Reverts gh-22614, and adds more detail about why that code is needed and
when it can be removed.
Closes gh-22796
[skip cirrus]
[skip circle]
|
| |
|
|
|
|
|
|
|
| |
(#22684)
* make isnan, isinf, isfinite, signbit, nextafter aliases
* fixes from review
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
|
| |\
| |
| | |
BLD: revert function() -> #define for 3 npymath functions
|
| | | |
|
| |\ \
| |/
|/|
| |
| | |
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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This was put in place for universal builds (the old kind, PPC/Intel),
and then extended for arm64 support. It was only needed when building
for two architectures in a single build.
We no longer support i386/PPC/universal, and for producing universal2
wheels for those users that want that, the way to do it is to
take a x86-64 wheel and an arm64 wheel and fuse those with the
`delocate-fuse` utility from `delocate`.
Hence this code is no longer needed.
|
| | |
|
| | |
|
| | |
|
| | |
|