| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
* DOC: Add example for np.ma.diag as part of numpy#22269
* Add descriptions to example.
* Fix typo.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Updates the free format handling of .f90 and other common extensions (through a minor re-write). Also removes an unused function.
This disallows previously allowed (but highly unlikely to be present) code-paths, namely having fixed form F77 code in a fortran 90 file (with .f90).
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
|
| |/
|/|
| |
| | |
assert_array_equal (#23015)
|
| |
| |
| |
| |
| |
| |
| | |
This pull requests speeds up numpy.load. Since _filter_header is quite a bottleneck, we only run it if we must. Users will get a warning if they have a legacy Numpy file so that they can save it again for faster loading.
Main discussion and benchmarks see #22898
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
|\ \
| | |
| | | |
DEP: Finalize `+arr` returning a copy e.g. for string arrays
|
| |/
| |
| |
| |
| |
| | |
This was deprecated 4-5 years ago in NumPy 1.16. Pandas stumbled
over it cleaning up their warning filters, so I decided to just
expire it.
|
|/
|
|
| |
The number "changed" is weird if the user fixed it, so give a different
message in that case.
|
| |
|
|\
| |
| | |
BUG: Ensure correct loop order in sin, cos, and arctan2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These were incorrect afer being vectorized. The commit additional
tests these (not arctan2 admittedly) and adds a check to generate_umath
to make it a bit less likely that future additions add this type of thing.
Note that the check allows duplicated loops so long they are correctly
ordered the *first* time. This makes results correct, but duplicated
loops are not nice anyways and it would be nice to remove them.
We could drop them manually in hindsight even? In any case, that should
not be backported, so it is not includedhere.
Closes gh-22984
|
|/
|
|
|
|
|
|
|
| |
This makes it possible for new-style NEP 42 string dtypes like ASCIIDType to work with the functions in np.char, this has leads to some mild modification (stricter behavior in bad paths).
It will only work with dtypes with a scalar that subclasses str or bytes. I also assume that you can create instances of the user dtype from python like dtype_instance = CustomDType(size_in_bytes). This is a pretty big assumption about the API of the dtype, I'm not sure offhand how I can do this more portably or more safely.
I also added a new macro, NPY_DT_is_user_defined, which checks dtype->type_num == -1, which is currently true for all custom dtypes using the experimental dtype API. This new macro is needed because NPY_DT_is_legacy will return false for np.void.
This is only tested via the user dtypes currently.
|
|\
| |
| |
| |
| | |
MAINT: Fix some noisy clang suggestions.
[ci skip]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The suggestions looks like:
```
numpy/core/src/npysort/selection.cpp:426:39: warning
suggest braces around initialization of subobject [-Wmissing-braces]
arg_map{Tags::type_value, &introselect_noarg<Tags>,
^~~~~~~~~~~~~~~~~~~~~~~~
{ }
```
|
|/ |
|
|\
| |
| | |
DOC: All integer values must be non-negative
|
| | |
|
| |
| |
| |
| | |
"All integer values must be non-negative"
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
PyArray_FillWithScalar checks if destination is writeable before attempting to fill it. A relevant test is added as a method of TestRegression
Closes gh-22922
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| | |
|
| |
| |
| |
| |
| | |
Make a note on results depending on system due.
Closes gh-22919
|
|\ \
| | |
| | | |
MAINT: Move export for scipy arm64 helper into main module
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
MAINT: Add additional information to missing scalar AttributeError
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is a followup on gh-22607 which removed them. Since it appears some
users missed the DeprecationWarning entirely, it may help them to
include the old information as an attribute error.
An example is:
```
In [1]: np.int
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself.
Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64`
or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for
additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note
at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
```
Yes, that is very verbose...
your changes. Lines starting
|
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | | |
Following up from #22863 (comment), this makes it possible to create string dtype instances from an abstract string DTypeMeta.
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
|
| | | |
|
| | |
| | |
| | | |
Cleanup from #22889
|
|\ \ \
| |/ /
|/| | |
ENH: Speedup ufunc.at when casting is not needed
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
loop"
This reverts commit 154c293786a29cfbf976f08cab48698166d99399.
|
| | |
| | |
| | |
| | | |
Signed-off-by: mattip <matti.picus@gmail.com>
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|