summaryrefslogtreecommitdiff
path: root/numpy/core
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | BUG: lib: Tiny fix for the loadtxt tokenizer when PyMem_Malloc() fails.warren2023-04-141-0/+2
| | | | | | | | |
| * | | | | | | | Merge pull request #23275 from byrdie/bugfix/logspace-base-broadcastSebastian Berg2023-04-122-5/+47
| |\ \ \ \ \ \ \ \ | | |_|_|/ / / / / | |/| | | | | | | ENH: Modify `np.logspace` so that the `base` argument broadcasts against `start` and `stop`
| | * | | | | | | ENH: Modify `numpy.logspace` so that the `base` argument broadcasts ↵Roy Smart2023-03-062-5/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correctly against `start` and `stop`.
| * | | | | | | | TST: try readding test_new_policy on muslAndrew Nelson2023-04-111-2/+1
| | | | | | | | |
| * | | | | | | | Merge pull request #23555 from ngoldbaum/deprecate-np-mathRalf Gommers2023-04-081-0/+9
| |\ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | DEP: deprecate np.math and np.lib.math [skip ci]
| | * | | | | | | DEP: deprecate np.math and np.lib.mathNathan Goldbaum2023-04-071-0/+9
| | | | | | | | |
| * | | | | | | | BLD: fix instances of MSVC detection in `meson.build`Ralf Gommers2023-04-071-3/+3
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows clang-cl and other MSVC-compatible compilers to build correctly. Closes gh-23506 [skip cirrus] [skip circle] [skip azp] Co-authored-by: Alexander Neumann <Alexander.Neumann@hamburg.de>
| * | | | | | | Merge pull request #23519 from F3eQnxN3RriK/fix-builtin-lenTyler Reddy2023-04-061-1/+1
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | DOC: Fix a reference to built-in `len` in `char.str_len` docstring
| | * | | | | | | DOC: Fix a reference to built-in `len` in `char.str_len` docstringyuki2023-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Built-in function `len()` should not have prefix `builtins.`, so removed it to fix the reference.
| * | | | | | | | Merge pull request #23495 from AlekseiNikiforovIBM/pytorch_fixesCharles Harris2023-04-052-7/+14
| |\ \ \ \ \ \ \ \ | | |_|_|_|/ / / / | |/| | | | | | | BUG: fix loading and storing big arrays on s390x
| | * | | | | | | BUG: fix loading and storing big arrays on s390xAleksei Nikiforov2023-03-302-7/+14
| | | |_|_|_|/ / | | |/| | | | |
| * | | | | | | Merge pull request #23521 from seiko2plus/cpp_2017Charles Harris2023-04-042-42/+4
| |\ \ \ \ \ \ \ | | |_|/ / / / / | |/| | | | | | ENH: Raise C++ standard to C++17
| | * | | | | | ENH: Raise C++ standard to C++17Sayed Adel2023-04-042-42/+4
| | | | | | | |
| * | | | | | | Merge pull request #23498 from ngoldbaum/buffer-error-fixCharles Harris2023-03-311-3/+11
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | MAINT: improve error when a dtype doesn't support the buffer interface
| | * | | | | | | MAINT: revert change to legacy pathNathan Goldbaum2023-03-301-1/+1
| | | | | | | | |
| | * | | | | | | MAINT: fix compiling on MUSLNathan Goldbaum2023-03-301-3/+2
| | | | | | | | |
| | * | | | | | | MAINT: improve error when a dtype doesn't support the buffer interfaceNathan Goldbaum2023-03-301-3/+12
| | | |_|/ / / / | | |/| | | | |
| * | | | | | | Merge pull request #23504 from seberg/decref-delCharles Harris2023-03-311-1/+0
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | DOC: Remove doc for non-existing `PyArray_XDECREF_ERR`
| | * | | | | | | MAINT: Remove reference to PyArray_GetArrayParamsFromObjectCharles Harris2023-03-311-1/+0
| | | |_|/ / / / | | |/| | | | |
| * | | | | | | DOC: Removed `.shape` setting note from reshape (#23491)JoryKlaverstijn2023-03-311-18/+3
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DOC: Changed the example for modifying the shape without modifying the initial object * DOC: Removed the example for directly assigning a tuple to the shape attribute of a numpy array * DOC: Re-added note about copying data when reshaping an array to numpy.reshape docs * DOC: reformat for linting --------- Co-authored-by: Jory Klaverstijn <j.klaverstijn@student.rug.nl> Co-authored-by: Matti Picus <matti.picus@gmail.com>
| * | | | | | DOC: Fix typos & grammer in docstrings and comments (#23503)Pratyay Banerjee2023-03-303-3/+3
| | |/ / / / | |/| | | |
| * | | | | MAINT: use PyArray_ClearBuffer in PyArray_FillWithScalarNathan Goldbaum2023-03-291-1/+2
| |/ / / /
| * | | | BUG: Use output when given on numpy.dot C-API branch (#23459)Pedro Lameiras2023-03-282-4/+19
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Updated the dot function C-API so that it now calls `np.multiply` with `out=` and returns it on branch of the function where the correct behaviour was not in place. Added two tests regarding this issue. Closes #21081. Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
| * | | BUG: in the fastest path form ufunc.at, properly increment args[2]mattip2023-03-272-0/+14
| | | |
| * | | TST: Fix failing test (introduced deprecation after written)Sebastian Berg2023-03-261-2/+2
| | | |
| * | | Merge pull request #21120 from BvB93/matmulMatti Picus2023-03-262-18/+131
| |\ \ \ | | | | | | | | | | ENH: Add support for inplace matrix multiplication
| | * | | BUG: Remove self == res assert for inplace matmulSebastian Berg2022-12-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears that assertion is not true for bad __array_ufunc__ or similar implementations. And we have at least one test that runs into it.
| | * | | ENH: Replace AxisError with more spefic oneSebastian Berg2022-12-021-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | In theory, an object matmul could be caught here, but lets assume that doesn't happen...
| | * | | ENH: Implement matmul using the nuclear optionsSebastian Berg2022-12-021-23/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the `axes` argument. Arguably the most correct version since we use the full ufunc machinery, so we can't mess up with random conversions (which the test suite actually did notice, at least for an array subclass). OTOH, for now the errors are ridiculously unhelpful, some of which could be fixed in the gufunc code (at least made _better_).
| | * | | MAINT: Move check and expand error message slightlySebastian Berg2022-12-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In principle, this is probably still not 100% correct always since we convert the the other object to an array upfront (to get the error). But the alternative solution using `axes=` seems tricky as well...
| | * | | MAINT: Explicitly raise when `a @= b` would otherwise broadcast the outputBas van Beek2022-12-022-2/+26
| | | | | | | | | | | | | | | | | | | | Add special casing for `1d @ 1d` and `2d @ 1d` ops.
| | * | | TST: Add `__imatmul__` tests for arrays with various shapesBas van Beek2022-12-021-5/+27
| | | | |
| | * | | TST: Add a dedicated `__imatmul__` test case for large matricesBas van Beek2022-12-021-1/+14
| | | | |
| | * | | TST: Add tests for inplace matrix multiplicationBas van Beek2022-12-021-11/+28
| | | | |
| | * | | DOC: Remove an outdated `matmul` commentBas van Beek2022-12-021-1/+0
| | | | |
| | * | | ENH: Add support for inplace matrix multiplicationBas van Beek2022-12-021-6/+6
| | | | |
| * | | | DOC: Remove descriptions in method declarationsyuki2023-03-231-2/+2
| | | | |
| * | | | Merge pull request #23404 from ngoldbaum/dtype-class-array-creationSebastian Berg2023-03-238-71/+198
| |\ \ \ \ | | | | | | | | | | | | ENH: allow using dtype classes in array creation functions
| | * | | | MAINT: add test for string dtype discovery from a dtypemetaNathan Goldbaum2023-03-201-0/+2
| | | | | |
| | * | | | MAINT: Simplify reference counting in the np.array() internal codeSebastian Berg2023-03-201-54/+35
| | | | | |
| | * | | | MAINT: respond to review commentsNathan Goldbaum2023-03-202-17/+27
| | | | | |
| | * | | | MAINT: move npy_dtype_info definition back to descriptor.hNathan Goldbaum2023-03-208-18/+13
| | | | | |
| | * | | | MAINT: avoid calling PyArray_AdaptDescriptorToArray in some casesNathan Goldbaum2023-03-171-4/+26
| | | | | |
| | * | | | MAINT: Indicate private functions with _int suffix.Nathan Goldbaum2023-03-173-35/+44
| | | | | | | | | | | | | | | | | | | | | | | | Also make internal versions accept a dtype and a descriptor.
| | * | | | BUG: handle errors from PyArray_AdaptDescriptorToArrayNathan Goldbaum2023-03-171-0/+5
| | | | | |
| | * | | | ENH: allow using dtype classes in array creation functionsNathan Goldbaum2023-03-1715-70/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables writing np.array(some_object, dtype=type(np.dtype('i'))). This is a follow-on from https://github.com/numpy/numpy/pull/23154, see that PR for more details. I had to add a new include to `ctors.h` to bring in the definition of the `npy_dtype_info` struct. Since `ctors.h` is included in many other files inside numpy, I found that I needed to modify fewer includes across numpy if I moved the definition of `npy_dtype_info` to `common.h` from `descriptor.h`. The new includes of `common.h` are needed to support later includes of `ctors.h` in those files. If anyone has an alternate place to put `npy_dtype_info` that would cause less churn of includes I'd love to hear about it. I spent a bunch of time tweaking the reference counts. I'm reasonably confident this is correct but not 100%, an additional careful pass over the reference count logic from a reviewer would be very appreciated. I could have made `_PyArray_FromAny` and `_PyArray_CheckFromAny` take just a `npy_dtype_info` struct, but I found it made the reference count logic more complicated, since `PyArray_FromAny` and `PyArray_CheckFromAny` steal the reference to the descriptor they are passed and I needed to conserve that behavior. Also both functions support passing in a `NULL` pointer for the descriptor and I needed to maintain that behavior as well. The change to `ucsnarrow.h` fixes a preexisting conflict with the prototype in `ucsnarrow.c` that triggered a compiler error while I was working on this.
| * | | | | Merge pull request #23240 from byrdie/bugfix/ufunc_where_propagationSebastian Berg2023-03-228-11/+119
| |\ \ \ \ \ | | | | | | | | | | | | | | ENH: Allow ``where`` argument to override ``__array_ufunc__``
| | * | | | | ENH: Modified `PyUFunc_CheckOverride` to allow the `where` argument to ↵Roy Smart2023-02-248-11/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | override `__array_ufunc__`.
| * | | | | | MAINT: Fix 'paramteric' typoChristian Veenhuis2023-03-211-8/+8
| | | | | | |
| * | | | | | BUG: Fix busday_count for reversed dates (#23229)Pieter Eendebak2023-03-202-3/+26
| | |/ / / / | |/| | | | | | | | | | Fixes #23197