summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | ENH: Hardcode buffer handling for simple scalarsSebastian Berg2020-05-3111-30/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For most scalars (except void ones) exposing the buffer interface is trivial and does not require any fancy "format" handling. Except for unicode, their buffer interface is also static and thus can simply be hardcoded. The main advantage, is that currently the buffer interface uses a global dictionary to store these buffers and thus requires probing that dictionary for every single scalar dealloc. This results in an overhead of about 30% for simple operations (such as slicing and simple math).
* | | | | | MAINT: Chain some exceptions. (#16418)Zuhair Ali-Khan2020-06-044-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: Chain extensions in numpy and numpy/core Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Zuhair Ali-Khan <54608785+zalikh2@users.noreply.github.com>
* | | | | | Merge pull request #16485 from seberg/gufunc-output-broadcasts-inputsMatti Picus2020-06-042-3/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | BUG: Fix result when a gufunc output broadcasts the inputs.
| * | | | | | BUG: Fix result when a gufunc output broadcasts the inputs.Sebastian Berg2020-06-022-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this case no error was given, but additional dimensions in the output simply ignored. Thus the returned array was only partially set. Now it will be fully set, with the calculation being repeated as often as necessary (typical broadcasting logic). This is consistent with how normal ufuncs work. Closes gh-16484
* | | | | | | Merge pull request #16474 from eric-wieser/tidy-piecewiseMatti Picus2020-06-021-8/+6
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | MAINT: use zip instead of range in piecewise
| * | | | | | MAINT: use zip instead of range in piecewiseEric Wieser2020-06-011-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor cleanup while looking at something else.
* | | | | | | Merge pull request #16463 from sethtroisi/tst_filter_filteredSebastian Berg2020-06-011-3/+16
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | DOC: Improve assert_warns docstring with example
| * | | | | | | DOC: Improve assert_warns docstring with exampleSeth Troisi2020-06-011-3/+16
| | | | | | | |
* | | | | | | | ENH: ARM Neon implementation with intrinsic for np.argmax. (#16375)Chunlin2020-06-011-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | * Neon implementation with intrinsic for bool argmax
* | | | | | | | ENH: Use AVX-512 for np.frexp and np.ldexp (#16371)Raghuveer Devulapalli2020-05-315-8/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * TST: Adding tests to validate strided np.ldexp and np.frexp * ENH: Use AVX-512 for float and double np.ldexp
* | | | | | | | DEP: Deprecate passing shape=None to mean shape=()Eric Wieser2020-05-314-14/+33
| |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | This requires some minor tweaks in `np.random` because there the two have different meanings, with `()` meaning 0d array and `None` meaning scalar.
* | | | | | | ENH: Use AVX-512 for np.isnan, np.infinite, np.isinf and np.signbit (#16334)Raghuveer Devulapalli2020-05-317-9/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: Use AVX-512 for np.isnan, np.infinite, np.isinf and np.signbit * TST: Add tests to validate isnan, isfinite, signbit and isinf ufuncs * BENCH: Adding benchmarks for isnan, isinf, isfinite and signbit
* | | | | | | TST: Add tests for PyArray_IntpConverter (gh-16454)Eric Wieser2020-05-312-0/+48
| |/ / / / / |/| | | | | | | | | | | Split from gh-15886.
* | | | | | Merge pull request #16444 from rgommers/sinc-docCharles Harris2020-05-301-4/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | DOC: make clearer that sinc is normalized by a factor pi
| * | | | | | DOC: make clearer that sinc is normalized by a factor piRalf Gommers2020-05-301-4/+11
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | Addresses gh-13457
* | | | | | investigate into warning usage, fixes deprecated warnforfun2020-05-301-2/+1
|/ / / / /
* | | | | MNT: Catch remaining cases of Py_SIZE and Py_TYPE as lvaluesThomas A Caswell2020-05-292-5/+4
| | | | |
* | | | | Merge pull request #16417 from tacaswell/fix_py310_compatCharles Harris2020-05-296-8/+17
|\ \ \ \ \ | | | | | | | | | | | | MAINT: support python 3.10
| * | | | | MNT: be more precise about version supportThomas A Caswell2020-05-291-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
| * | | | | MNT: define macros supplied in py39 and aboveThomas A Caswell2020-05-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support the change to Py_SIZE and Py_TYPE the Py_SET_SIZE and Py_SET_TYPE macros are provided in py39. This provides the same macros falling back to the old method for < py39.
| * | | | | MNT: support python 3.10Thomas A Caswell2020-05-295-8/+8
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://github.com/python/cpython/pull/20290 CPython changed `Py_TYPE` from a macro to an inline function. This requires a code change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue in c code. In https://github.com/python/cpython/pull/20429 CPython changed `Py_SIZE` from a macro to an inline function. This requires a code change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c code.
* | | | | BUG: Add extern to PyArrayDTypeMeta_Type declarationSebastian Berg2020-05-291-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This was missing the extern, but pre GCC 10 it seemed to have worked fine without. Closes gh-16419
* | | | Merge pull request #16422 from sethtroisi/tst_filter_filteredRalf Gommers2020-05-291-5/+3
|\ \ \ \ | | | | | | | | | | DOC: Update assert_warns parameter list
| * | | | DOC: Update assert_warns parameter listSeth Troisi2020-05-281-5/+3
| | | | |
* | | | | TST: Simplify assert_warns in test_io.pySeth Troisi2020-05-281-17/+8
|/ / / /
* | | | Merge pull request #15900 from seberg/deprecate-empty-indexing-errorMatti Picus2020-05-282-9/+73
|\ \ \ \ | | | | | | | | | | DEP: Ensure indexing errors will be raised even on empty results
| * | | | DEP: Ensure indexing errors will be raised even on empty resultsSebastian Berg2020-05-272-9/+73
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when the indexing result was empty, no check was done for backward compatibility with pre 1.9 (assumingly). This may have been only necessary when the outer iteration is empty as opposed to when just the inner iteration is empty, though. In any case, it is arguably buggy to ignore indexing errors in this case. Since there may have been a reason back in the day, and this is probably extremely rare, optiming for a brief deprecation period for now. Closes gh-15898 Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Matti Picus <matti.picus@gmail.com>
* | | | Merge pull request #16304 from seiko2plus/issue_16302Charles Harris2020-05-272-9/+34
|\ \ \ \ | | | | | | | | | | TST, MAINT: Fix detecting and testing armhf features
| * | | | TST, MAINT: Fix detecting and testing armhf featuresSayed Adel2020-05-262-9/+34
| | | | | | | | | | | | | | | | | | | | | | | | | - fix detect and test Arm Advanced SIMD on aarch32 - fix testing armhf's rootfs on aarch64 kernel
* | | | | Merge pull request #15508 from seberg/dtypemeta-newMatti Picus2020-05-2714-30/+481
|\ \ \ \ \ | | | | | | | | | | | | API: Create Preliminary DTypeMeta class and np.dtype subclasses
| * | | | | small fixups/name changesSebastian Berg2020-03-183-56/+52
| | | | | |
| * | | | | PyDict_GET_SIZE is not public (or at least not on older python)Sebastian Berg2020-03-181-1/+1
| | | | | |
| * | | | | Improve docs and test slightl; Reject also kwargs in dtype from type creationSebastian Berg2020-03-182-3/+12
| | | | | |
| * | | | | Use "parametric" instead of "flexible" and add tests for attributesSebastian Berg2020-03-184-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that these attributes are *not* fixed yet, just a start to have something.
| * | | | | Add tests and fixup __name__Sebastian Berg2020-03-182-4/+29
| | | | | |
| * | | | | STY: Just small indentation fixupSebastian Berg2020-03-181-17/+18
| | | | | |
| * | | | | Create a static prototype to copy, so that it is more obvious what the ↵Sebastian Berg2020-03-181-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | intention is
| * | | | | Small fixups/commentsSebastian Berg2020-03-182-20/+15
| | | | | |
| * | | | | Possible initialization safety fixups and fix API hash.Sebastian Berg2020-03-184-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (currently no public API changes, but the hash changed). The type safety may not be important as such, but there used to be issues, at least with MSVC about this, and clang warns.
| * | | | | API: Create Preliminary DTypeMeta class and np.dtype subclassesSebastian Berg2020-03-1811-15/+405
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes all dtypes being subclasses of a: class DType(np.dtype): is_abstract = False is_flexible = False % True for void, strings, and datetimes singleton = prototype_dtype_instance # other information defined on the singleton currently subclass of np.dtype. Right now this happens by replacing the Type field of of the singleton instance. This is valid for types/objects not created in python (not HeapTypes). It is necessary to have this functionality for continuing support of user defined legacy dtypes.
* | | | | MAINT: core: Use a raw string for the fromstring docstring.Warren Weckesser2020-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This docstring needs to be a raw string so the backslashes in the example are not processed by Python or Sphinx. Closes gh-16390.
* | | | | Merge pull request #15037 from tirthasheshpatel/patch-1Sebastian Berg2020-05-262-12/+46
|\ \ \ \ \ | | | | | | | | | | | | BUG: `np.resize` negative shape and subclasses edge case fixes
| * | | | | BUG: `np.resize` negative shape and subclasses edge case fixestirthasheshpatel2020-01-172-12/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a negative entry is passed into `np.resize` shape, an error will now be raised reliably. Previously the `-1` semantics of reshape allowed edge cases to pass and return incorrect results. In the corner case of an empty result shape or empty input shape, the result type will now be preserved.
* | | | | | Add comment for delayed importsSteve Dower2020-05-261-0/+3
| | | | | |
* | | | | | Defer ctypes imports in _dtypes_ctypes moduleSteve Dower2020-05-261-2/+3
| |_|_|/ / |/| | | |
* | | | | Merge pull request #16351 from seberg/fix-leaksMatti Picus2020-05-263-5/+13
|\ \ \ \ \ | | | | | | | | | | | | BUG: Fix small leaks in error path and `empty_like` with shape
| * | | | | BUG: Add missing dimensions free in `empty_like` with shapeSebastian Berg2020-05-221-0/+1
| | | | | |
| * | | | | BUG: Fix reference count leak in array allocation memory pathSebastian Berg2020-05-222-5/+12
| | | | | |
* | | | | | ENH: Optimize Cpu feature detect in X86, fix for GCC on macOS (#16297)Chunlin2020-05-261-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix cpu detection for X86, GCC, and macOS * Optimize feature detection Co-authored-by: Matti Picus <matti.picus@gmail.com>
* | | | | | Merge pull request #16266 from jbrockmendel/cyapiMatti Picus2020-05-235-1/+276
|\ \ \ \ \ \ | | | | | | | | | | | | | | ENH: include dt64/td64 structs and funcs and tests in __init__.pxd.