| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| | |
| | | |
BLD: remove redundant definition of npy_nextafter [wheel build]
|
|/ / |
|
|\ \
| | |
| | | |
TYP, MAINT: Add a missing explicit ``Any`` parameter to the ``npt.ArrayLike`` definition
|
|/ /
| |
| |
| | |
definition
|
|\ \
| | |
| | | |
BUG: Add missing <type_traits> header.
|
| | |
| | |
| | |
| | |
| | | |
`std::is_scalar` is defined in `type_traits`, which is missing from the
includes.
|
|\ \ \
| | | |
| | | | |
BUG: Fix integer / float scalar promotion
|
| | | | |
|
| | | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Integer true division converted the other type directly to the output.
This is correct if both operands are integers, but since the output
of integer division is double precision, it is incorrect when the
other operand is a float32 or float16.
The solution is that we must convert to the same type (as always)
and only the output type is adjusted, but not the inputs.
This means that `integer / float` will correctly defer to the float
which leads to correct promotion.
|
|\ \ \
| |/ /
|/| | |
BUG: Fix for npyv__trunc_s32_f32 (VXE)
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
np.sin(), np.cos() are giving erroneous result for float32 (VXE)
This PR is fixing `npyv_s32 npyv__trunc_s32_f32(npyv_f32 a)`
to resolve the issue.
|
|\ \
| | |
| | | |
BUG: use `_Alignof` rather than `offsetof()` on most compilers
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
WG14 N2350 made very clear that it is an UB having type definitions
within "offsetof" [1]. This patch enhances the implementation of macro
_ALIGN to use builtin "_Alignof" to avoid undefined behavior on
when using std=c11 or newer
clang 16+ has started to flag this [2]
Fixes build when using -std >= gnu11 and using clang16+
Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it
may support C11, exclude those compilers too
[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm
[2] https://reviews.llvm.org/D133574
Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Apply suggestions from code review
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
|\ \ \
| |/ /
|/| | |
DOC: Add version added information for the strict parameter in assert_array_equal
|
|/ /
| |
| |
| | |
assert_array_equal (#23015)
|
|\ \
| | |
| | | |
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
|
|\ \
| | |
| | | |
BUG, SIMD: Fix spurious invalid exception for sin/cos on arm64/clang
|
|/ / |
|
|\ \
| | |
| | | |
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
|
|\ \ \
| | | |
| | | | |
BUG: Fix fill violating read-only flag. (#22959)
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|\ \ \
| | | |
| | | | |
TST: Add fixture to avoid issue with randomizing test order.
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
BUG: np.loadtxt cannot load text file with quoted fields separated by whitespace
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
whitespace (#22906)
Fix issue with `delimiter=None` and quote character not working properly (not using whitespace delimiter mode).
Closes gh-22899
|
|\ \ \
| | | |
| | | | |
ENH: Detect CPU features on FreeBSD/powerpc64*
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. FreeBSD uses elf_aux_info() instead of getauxval.
2. Switch to using compiler macros for detecting POWER platform
FreeBSD sets the machine name (what uname -m prints) on all powerpc* to
just powerpc. To identify actual architecture, uname -p should be used,
but this is not present in uname() function. Thus, the only way to
correctly detect platform is to use what uname prints and also check
compiler defines.
|
|\ \ \
| |/ /
|/| | |
DOC: Remove dangling deprecation warning
|
|/ /
| |
| | |
This deprecation is no longer mentioned elsewhere on the page.
|
|\ \
| | |
| | | |
MAINT: Update python 3.11-dev to 3.11.
|
|/ / |
|
| | |
|
|\ \
| | |
| | | |
REL: Prepare for the NumPY 1.24.1 release.
|
|/ /
| |
| |
| |
| | |
- Create 1.24.1-changelog.rst
- Update 1.24.1-notes.rst
|
|\ \
| | |
| | | |
BUG: Use whole file for encoding checks with ``charset_normalizer``.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(#22872)
* BUG: Use whole file for encoding checks [f2py]
* DOC: Add a code comment
Co-authored-by: melissawm <melissawm@gmail.com>
* TST: Add a conditional unicode f2py test
* MAINT: Add chardet as a test requirement
* ENH: Cleanup and switch f2py to charset_normalizer
* MAINT: Remove chardet for charset_normalizer
* TST: Simplify UTF-8 encoding [f2py]
Co-authored-by: melissawm <melissawm@gmail.com>
|
|\ \ \
| | | |
| | | | |
MAINT: restore npymath implementations needed for freebsd
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
BUG: Fix integer overflow in in1d for mixed integer dtypes #22877
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* TST: Mixed integer types for in1d
* BUG: Fix mixed dtype overflows for in1d (#22877)
* BUG: Type conversion for integer overflow check
* MAINT: Fix linting issues in in1d
* MAINT: ar1 overflow check only for non-empty array
* MAINT: Expand bounds of overflow check
* TST: Fix integer overflow in mixed boolean test
* TST: Include test for overflow on mixed dtypes
* MAINT: Less conservative overflow checks
|
|\ \
| | |
| | | |
TST: Ignore nan-warnings in randomized out tests
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
The tests randomize the nan pattern and thus can run into these
(additional) warnings, so ignore them.
(Could also fix the random seed, but this should do)
Closes gh-22835
|
|\ \
| | |
| | | |
BUG: Fortify string casts against floating point warnings
|