summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #23161 from mattip/npy_nextafterCharles Harris2023-02-051-4/+0
|\ \ | | | | | | BLD: remove redundant definition of npy_nextafter [wheel build]
| * | BLD: remove redundant definition of npy_nextafter [wheel build]mattip2023-02-051-4/+0
|/ /
* | Merge pull request #23150 from charris/backport-23144Charles Harris2023-02-021-4/+11
|\ \ | | | | | | TYP, MAINT: Add a missing explicit ``Any`` parameter to the ``npt.ArrayLike`` definition
| * | TYP,MAINT: Add a missing explicit `Any` parameter to the `npt.ArrayLike` ↵BvB932023-02-021-4/+11
|/ / | | | | | | definition
* | Merge pull request #23149 from charris/backport-23128Charles Harris2023-02-021-0/+1
|\ \ | | | | | | BUG: Add missing <type_traits> header.
| * | Add missing <type_traits> header.Peter Hawkins2023-02-021-0/+1
| | | | | | | | | | | | | | | `std::is_scalar` is defined in `type_traits`, which is missing from the includes.
* | | Merge pull request #23148 from charris/backport-23079Charles Harris2023-02-022-28/+56
|\ \ \ | | | | | | | | BUG: Fix integer / float scalar promotion
| * | | TST: Explicitly ignore promotion issues for array**2 in hypothesis testSebastian Berg2023-02-021-1/+6
| | | |
| * | | TST: Expand scalar/umath comparison tests especially for dtypesSebastian Berg2023-02-021-12/+42
| | | |
| * | | BUG: Fix `integer / float` scalar promotionSebastian Berg2023-02-021-16/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #23147 from charris/backport-23077Charles Harris2023-02-021-1/+2
|\ \ \ | |/ / |/| | BUG: Fix for npyv__trunc_s32_f32 (VXE)
| * | replace __builtin_s390_vflls with npyv_doublee as beforePradipta Ghosh2023-02-021-2/+2
| | |
| * | BUG: Fix for npyv_s32 npyv__trunc_s32_f32 (VXE)Pradipta Ghosh2023-02-021-1/+2
|/ / | | | | | | | | | | 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.
* | Merge pull request #23031 from charris/backport-23016Charles Harris2023-01-172-3/+13
|\ \ | | | | | | BUG: use `_Alignof` rather than `offsetof()` on most compilers
| * | BUG: use `_Alignof` rather than `offsetof()` on most compilers (#23016)Khem Raj2023-01-172-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge pull request #23030 from charris/backport-23015Charles Harris2023-01-171-0/+2
|\ \ \ | |/ / |/| | DOC: Add version added information for the strict parameter in assert_array_equal
| * | DOC: Add version added information for the strict parameter in ↵Mark Harfouche2023-01-171-0/+2
|/ / | | | | | | assert_array_equal (#23015)
* | Merge pull request #22989 from charris/backport-22986Charles Harris2023-01-102-5/+54
|\ \ | | | | | | BUG: Ensure correct loop order in sin, cos, and arctan2
| * | BUG: Ensure correct loop order in sin, cos, and arctan2Sebastian Berg2023-01-102-5/+54
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #22976 from charris/backport-22954Charles Harris2023-01-091-2/+27
|\ \ | | | | | | BUG, SIMD: Fix spurious invalid exception for sin/cos on arm64/clang
| * | BUG, SIMD: Fix spurious invalid exception for sin/cos on arm64/clangSayed Adel2023-01-091-2/+27
|/ /
* | Merge pull request #22972 from charris/backport-22939Charles Harris2023-01-093-15/+16
|\ \ | | | | | | MAINT: Move export for scipy arm64 helper into main module
| * | restore declaration of npy_nextaftermattip2023-01-091-0/+2
| | |
| * | MAINT: Move export for scipy arm64 helper into main moduleSebastian Berg2023-01-083-16/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #22971 from charris/backport-22947Charles Harris2023-01-082-2/+53
|\ \ | | | | | | MAINT: Add additional information to missing scalar AttributeError
| * | MAINT: Add additional information to missing scalar AttributeErrorSebastian Berg2023-01-082-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #22970 from charris/backport-22959Charles Harris2023-01-082-0/+12
|\ \ \ | | | | | | | | BUG: Fix fill violating read-only flag. (#22959)
| * | | Bug: Fix fill violating read-only flag. (#22959)Panagiotis Zestanakis2023-01-082-0/+12
| |/ / | | | | | | | | | | | | | | | | | | 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>
* | | Merge pull request #22969 from charris/backport-22931Charles Harris2023-01-081-0/+4
|\ \ \ | | | | | | | | TST: Add fixture to avoid issue with randomizing test order.
| * | | TST: Add fixture to avoid issue with randomizing test order.Ross Barnowski2023-01-081-0/+4
| |/ /
* | | Merge pull request #22968 from charris/backport-22906Charles Harris2023-01-083-1/+24
|\ \ \ | | | | | | | | BUG: np.loadtxt cannot load text file with quoted fields separated by whitespace
| * | | BUG: np.loadtxt cannot load text file with quoted fields separated by ↵dmbelov2023-01-083-1/+24
| |/ / | | | | | | | | | | | | | | | | | | whitespace (#22906) Fix issue with `delimiter=None` and quote character not working properly (not using whitespace delimiter mode). Closes gh-22899
* | | Merge pull request #22967 from charris/backport-22777Charles Harris2023-01-082-4/+20
|\ \ \ | | | | | | | | ENH: Detect CPU features on FreeBSD/powerpc64*
| * | | ENH: Detect CPU features on FreeBSD/powerpc64*pkubaj2023-01-082-4/+20
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #22966 from charris/backport-22708Charles Harris2023-01-081-4/+0
|\ \ \ | |/ / |/| | DOC: Remove dangling deprecation warning
| * | Remove dangling deprecation warningSyam Gadde2023-01-081-4/+0
|/ / | | | | This deprecation is no longer mentioned elsewhere on the page.
* | Merge pull request #22965 from charris/update-ci-test-matrixCharles Harris2023-01-081-1/+1
|\ \ | | | | | | MAINT: Update python 3.11-dev to 3.11.
| * | MAINT: Update python 3.11-dev to 3.11.Charles Harris2023-01-081-1/+1
|/ /
* | MAINT: Prepare 1.24.x for further developmentCharles Harris2022-12-264-2/+18
| |
* | Merge pull request #22888 from charris/prepare-1.24.1-releasev1.24.1Charles Harris2022-12-252-3/+80
|\ \ | | | | | | REL: Prepare for the NumPY 1.24.1 release.
| * | REL: Prepare for the NumPY 1.24.1 release.Charles Harris2022-12-252-3/+80
|/ / | | | | | | | | - Create 1.24.1-changelog.rst - Update 1.24.1-notes.rst
* | Merge pull request #22887 from charris/backport-22872Charles Harris2022-12-254-25/+45
|\ \ | | | | | | BUG: Use whole file for encoding checks with ``charset_normalizer``.
| * | BUG: Use whole file for encoding checks with `charset_normalizer` [f2py] ↵Rohit Goswami2022-12-254-25/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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>
* | | Merge pull request #22883 from charris/backport-22882Charles Harris2022-12-253-18/+446
|\ \ \ | | | | | | | | MAINT: restore npymath implementations needed for freebsd
| * | | MAINT: restore npymath implementations needed for freebsdmattip2022-12-253-18/+446
| |/ /
* | | Merge pull request #22884 from charris/backport-22878Charles Harris2022-12-252-4/+55
|\ \ \ | |/ / |/| | BUG: Fix integer overflow in in1d for mixed integer dtypes #22877
| * | BUG: Fix integer overflow in in1d for mixed integer dtypes #22877 (#22878)Miles Cranmer2022-12-252-4/+55
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Merge pull request #22875 from charris/backport-22869Charles Harris2022-12-221-0/+2
|\ \ | | | | | | TST: Ignore nan-warnings in randomized out tests
| * | TST: Ignore nan-warnings in randomized out testsSebastian Berg2022-12-221-0/+2
|/ / | | | | | | | | | | | | | | 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
* | Merge pull request #22868 from charris/backport-22855Charles Harris2022-12-223-4/+24
|\ \ | | | | | | BUG: Fortify string casts against floating point warnings