summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* STY: Move exception to same line of PyErr_FormatPeter Andreas Entschev2020-11-191-2/+1
| | | Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* MAINT: Check like= type for __array_function__Peter Andreas Entschev2020-11-171-1/+1
|
* MAINT: Use get_array_function with like=Peter Andreas Entschev2020-11-171-1/+1
|
* MAINT: Change like= exception to TypeErrorPeter Andreas Entschev2020-11-173-3/+3
|
* TST: Test strict like=Peter Andreas Entschev2020-11-161-19/+7
|
* MAINT: Make like= in np.array() strictPeter Andreas Entschev2020-11-161-3/+8
| | | | Only allow objects that implement __array_function__
* MAINT: Make like= in Python functions strictPeter Andreas Entschev2020-11-164-27/+71
| | | | Only allow objects that implement __array_function__
* MAINT: Add array_function_dispatch_like helperPeter Andreas Entschev2020-11-161-0/+9
| | | | | | This helper is used to dispatch a Python function with the like= argument or raise an error if the object passed doesn't implement the __array_function__ protocol.
* Merge pull request #17743 from isuruf/cblas_winMatti Picus2020-11-151-0/+15
|\ | | | | BLD, BUG: Fix cblas detection on windows
| * Fix cblas detection on windowsIsuru Fernando2020-11-091-0/+15
| |
* | TST: Simplify Hypothesis configZac-HD2020-11-152-21/+17
| | | | | | | | All configuration is now done in conftest.py, and detection of dev/user mode is based on the presence of pytest.ini in the repo root. See #17390.
* | Merge pull request #17763 from seiko2plus/issue_17761Charles Harris2020-11-142-33/+49
|\ \ | | | | | | SIMD, BUG: fix reuses the previous values during the fallback to libc
| * | MAINT, SIMD: remove unlikely and give constant hint to improve memory access ↵Sayed Adel2020-11-141-8/+5
| | | | | | | | | | | | of glibc fallback
| * | SIMD, BUG: fix reuses the previous values during the fallback to libcSayed Adel2020-11-122-33/+52
| | |
* | | TST: Updated the scalar typing testsBas van Beek2020-11-143-2/+35
| | |
* | | MAINT: Move a number of methods to `ndarray` / `generic`Bas van Beek2020-11-141-45/+61
| | |
* | | Merge pull request #17643 from BvB93/ufunc_configCharles Harris2020-11-145-7/+179
|\ \ \ | | | | | | | | ENH: Add annotations for `np.core._ufunc_config`
| * | | TST: Added typing tests for `np.core._ufunc_config`Bas van Beek2020-10-263-0/+96
| | | |
| * | | ENH: Add annotations for `np.core._ufunc_config`Bas van Beek2020-10-262-7/+83
| | | |
* | | | Merge pull request #17645 from lormuc/timedelta-nat-formatCharles Harris2020-11-142-1/+6
|\ \ \ \ | |_|/ / |/| | | BUG: fix np.timedelta64('nat').__format__ throwing an exception
| * | | BUG: fix np.timedelta64('nat').__format__ throwing an exceptionVeniamin Petrenko2020-10-272-1/+6
| |/ / | | | | | | | | | Closes #17552
* | | Merge pull request #17755 from seberg/valgrind-fixes2Matti Picus2020-11-122-2/+4
|\ \ \ | | | | | | | | BUG: Fix memory leaks found using valgrind
| * | | BUG: Fix leak in ufunc.outer matrix deprecationSebastian Berg2020-11-111-0/+1
| | | |
| * | | TST: Fix memory/refcount leak in `_simd` test codeSebastian Berg2020-11-111-2/+3
| | | |
* | | | BLD: Lazy load f2py test utilitiesDustin Spicuzza2020-11-121-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These are only used during testing. It's fine to load it while running the test because actually running the test can't be done while cross compiling. Part of changes to support #17620 to prevent importing numpy during builds to support cross-compilation
* | | | Merge pull request #17753 from seberg/valgrind-fixesSebastian Berg2020-11-111-4/+6
|\ \ \ \ | |/ / / | | | | BUG: Fix buffer export dtype references
| * | | BUG: Fix buffer export dtype referencesSebastian Berg2020-11-111-4/+6
| | | | | | | | | | | | | | | | | | | | There is a small refcount bug introduced when fixing/improving the buffer export code recently. This fixes it.
* | | | Update numpy/core/memmap.pyMatti Picus2020-11-111-1/+1
| | | | | | | | | | | | Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* | | | DOC: update documentation of numpy.memmapMatti Picus2020-11-111-4/+7
| | | |
* | | | TST: avoid refcount semantics, speed up testsMatti Picus2020-11-111-85/+56
| | | |
* | | | Merge pull request #17751 from seberg/fix-ci-segfaultsCharles Harris2020-11-101-1/+1
|\ \ \ \ | | | | | | | | | | BUG: Fix segfault due to out of bound pointer in floatstatus check
| * | | | Update numpy/core/src/umath/simd.inc.srcSebastian Berg2020-11-101-1/+1
| | | | |
| * | | | BUG: Fix segfault due to out of bound pointer in floatstatus checkSebastian Berg2020-11-101-1/+1
| |/ / /
* | | | BLD: compare platform.architecture() correctlyxoviat2020-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | The function returns a tuple of values, of which we need to check the first. Fixes #17489.
* | | | Merge pull request #16247 from seiko2plus/to_npyv_unaryfp_g0Matti Picus2020-11-1023-236/+702
|\ \ \ \ | |/ / / |/| | | ENH:Umath Replace raw SIMD of unary float point(32-64) with NPYV - g0
| * | | TST, SIMD: Add test cases for sqrt, abs, recip and square intrinsicsSayed Adel2020-11-032-1/+96
| | | |
| * | | MAINT: reorder `Python.h` to suppress warning 'declaration of 'struct timespec*'Sayed Adel2020-11-033-8/+6
| | | |
| * | | ENH, SIMD: Replace raw SIMD of unary float point(32-64) with NPYV - g0Sayed Adel2020-11-037-222/+327
| | | | | | | | | | | | | | | | | | | | | | | | - only covers sqrt, absolute, square and reciprocal - fix SIMD memory overlap check for aliasing(same ptr & stride) - unify fp/domain errors for both scalars and vectors
| * | | ENH, SIMD: Add sqrt, abs, recip and square intrinsics for f32/64Sayed Adel2020-11-0311-5/+273
| | | | | | | | | | | | | | | | this patch also improves division precision for NEON/A32
* | | | BUG: Raise promotion error if a DType was provided in array coercion (gh-17706)Sebastian Berg2020-11-093-10/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new array coercion code incorrectly promoted to "object" when a promotion was impossible and a dtype passed in. This likely only was relevant for `dtype="V"` where different void dtypes (structured or different length) often cannot be promoted to each other. Previously, this worked in some cases e.g. when the array contained byte strings the correct string was found and then cast to void. Now the void dtypes are promoted, and this fails (unless the string lengths match). The error for promotion is now refined in this case.
* | | | Merge pull request #17733 from WarrenWeckesser/ma-no-optionsMatti Picus2020-11-092-3/+7
|\ \ \ \ | |_|_|/ |/| | | MAINT: ma: Remove unused `**options` from MaskedArray `__new__` method.
| * | | MAINT: ma: Remove unused `**options` from MaskedArray `__new__` method.Warren Weckesser2020-11-082-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `__new__` method of `MaskedArray` has the parameter `**options`, but it is not used. This means a mistyped parameter is silently ignored, e.g. if I mistype the `mask` parameter like this, I don't get an error: In [2]: m = np.ma.MaskedArray([1, 2, 3], maks=[0, 1, 0]) In [3]: m Out[3]: masked_array(data=[1, 2, 3], mask=False, fill_value=999999) In this PR, I simply remove `**options` from the signature of `MaskedArray.__new__`. This affected one test. That test was passing the argument `shape=(0, 1, 2)` to the constructor of a subclass of `MaskedArray`, but since any unknown keywords were silently ignored, that use of `shape` had no effect. I replaced it with the positional argument `[[[]], [[]]]`, which I believe has the effect that was originally intended with the use of the `shape` argument.
* | | | Merge pull request #17598 from simon-graham/array_tofile_cleanupMatti Picus2020-11-092-18/+46
|\ \ \ \ | | | | | | | | | | BUG: Fixed file handle leak in array_tofile.
| * | | | TST: Check that tofile closes its Python handle when we pass it a str.Simon Graham2020-10-291-1/+4
| | | | | | | | | | | | | | | | | | | | If we pass a str to tofile() rather than an open file object, it will open a Python handle. Make sure that it gets closed correctly.
| * | | | MAINT: Refactored array_tofile to use a helper function.Simon Graham2020-10-291-22/+27
| | | | |
| * | | | BUG: Made array_tofile exception safe.Simon Graham2020-10-291-13/+17
| | | | |
| * | | | BUG: array_tofile now always closes the original file handle.Simon Graham2020-10-291-18/+19
| | | | |
| * | | | Update numpy/core/src/multiarray/methods.cSimon Graham2020-10-291-4/+12
| | | | | | | | | | | | | | | Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
| * | | | BUG: Fixed file handle leak in array_tofile.Simon Graham2020-10-292-5/+12
| | | | | | | | | | | | | | | | | | | | The dup-ed file handle created in array_tofile is now closed when PyArray_ToFile fails.
* | | | | BLD: Use importlib to find numpy root directory in distutilsDustin Spicuzza2020-11-071-3/+3
| |/ / / |/| | | | | | | | | | | Part of changes for #17620 to prevent importing numpy during builds to support cross compilation.