summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* pass descriptor rather than nullGregory Lee2021-06-241-5/+2
|
* BUG: protect against access an attribute of a NULL pointerGregory Lee2021-06-241-2/+7
| | | | Have PyArray_GetCastSafety return -1 if from is NULL
* Merge pull request #19135 from ganesh-k13/BUG_13236_remove_complex_floor_divideCharles Harris2021-06-238-116/+35
|\ | | | | BUG: Remove complex floor divide
| * BUG, TST: Determine complex types using typecodesGanesh Kathiresan2021-05-301-2/+2
| |
| * BUG, TST: Removed complex floor division cases in typing:revealGanesh Kathiresan2021-05-301-24/+0
| |
| * BUG, TST: Removed complex floor division cases in typing:passGanesh Kathiresan2021-05-301-22/+0
| |
| * BUG: Removed `__*floordiv__` referencesGanesh Kathiresan2021-05-301-6/+0
| |
| * TST: Changed TC to check for `TypeError` in floor divideGanesh Kathiresan2021-05-291-15/+27
| |
| * TST: Changed TC to check for `TypeError` in floor divide | Added asserts for ↵Ganesh Kathiresan2021-05-291-9/+7
| | | | | | | | divmod and remainder
| * BUG: Removed complex type for floor_divideGanesh Kathiresan2021-05-291-1/+1
| |
| * BUG: Removed floor_divide definition for complex typeGanesh Kathiresan2021-05-291-36/+0
| |
| * BUG: Removed floor_divide declaration for complex typeGanesh Kathiresan2021-05-291-3/+0
| |
* | Merge pull request #19225 from asmeurer/matrix_rank-doc-fixCharles Harris2021-06-232-23/+23
|\ \ | | | | | | DOC: Fix some inconsistencies in the docstring of matrix_rank
| * | Fix the matrix_rank signature in the stub fileAaron Meurer2021-06-141-1/+1
| | |
| * | Merge branch 'main' into matrix_rank-doc-fixAaron Meurer2021-06-14510-15519/+44645
| |\ \
| * | | Fix some inconsistencies in the docstring of matrix_rankAaron Meurer2021-06-111-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename the argument from M to A, since M already refers to the number of rows in the docstring. - Fix the documentation for the formula for the default value of tol. It only uses the maximum of the number of rows and columns, not the max of all dimensions. The code here was correct; only the documentation was wrong.
* | | | Merge pull request #19286 from BvB93/type_checkCharles Harris2021-06-234-17/+331
|\ \ \ \ | | | | | | | | | | ENH: Add annotations for `np.lib.type_check`
| * | | | TST: Add typing tests for `np.lib.type_check`Bas van Beek2021-06-202-0/+86
| | | | |
| * | | | MAINT: Fixed an issue with the return-dtype of `ndarray.real` and `imagBas van Beek2021-06-201-2/+14
| | | | | | | | | | | | | | | | | | | | The latter two would previously return complex arrays if the initial array was also complex
| * | | | ENH: Add annotations for `np.lib.type_check`Bas van Beek2021-06-201-15/+231
| | | | |
* | | | | Merge pull request #19298 from BvB93/c_intp_docsMatti Picus2021-06-221-5/+4
|\ \ \ \ \ | | | | | | | | | | | | DOC: Add documentation for `np.ctypeslib.c_intp`
| * | | | | DOC: Add documentation for `np.ctypeslib.c_intp`Bas van Beek2021-06-221-5/+4
| | | | | |
* | | | | | MAINT: Add simple tuple creation helper and use itSebastian Berg2021-06-214-26/+35
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new dispatching code requires a few more places where a similar tuple is created, so add the helper and use it in three places only. But more will be added (especially more that require the NULL -> None logic).
* | | | | Merge pull request #19257 from seberg/main-ufunc-move-prep-and-resolutionMatti Picus2021-06-213-166/+116
|\ \ \ \ \ | | | | | | | | | | | | MAINT: Move array-prep and type resolution to earlier
| * | | | | Update numpy/core/src/umath/ufunc_object.cSebastian Berg2021-06-201-1/+1
| | | | | | | | | | | | | | | | | | Co-authored-by: Matti Picus <matti.picus@gmail.com>
| * | | | | MAINT: Move array-prep and type resolution to earlierSebastian Berg2021-06-173-166/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes a bug in the masked handling of array prep, that was seems to have been simply completely broken. Note that the long term goal is to unify the masked and non-masked, but that is tricky right now due to the different signatures.
* | | | | | Merge pull request #19276 from seberg/issue-19153Matti Picus2021-06-215-53/+38
|\ \ \ \ \ \ | | | | | | | | | | | | | | BUG: Fix `arr.flat.index` for large arrays and big-endian machines
| * | | | | | BUG: Fix `arr.flat.index` for large or big-endian machinesSebastian Berg2021-06-182-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type read when exposing was previously int, but has to be intp. this would only be visible for >2**31 elements, but is also visible on big-endian machines. Closes gh-19153
| * | | | | | MAINT: Introduce `PyArray_PyIntFromIntp` to remove ifdef'sSebastian Berg2021-06-184-47/+17
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #19275 from BvB93/dtypesCharles Harris2021-06-192-38/+50
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: Misc typing maintenance for `np.dtype`
| * | | | | | ENH: Allow `dtype.__getitem__` to take any object implementing the ↵Bas van Beek2021-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `__index__` protocol
| * | | | | | TST: Update the dtype typing testsBas van Beek2021-06-181-21/+30
| | | | | | |
| * | | | | | MAINT: Set the return-dtype of `dtype.base` and `dtype.subdtype` to `Any`Bas van Beek2021-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether the return dtype is equivalent to the initial dtype depends on whether the initial dtype is structured or if it has fields of a fixed size
| * | | | | | MAINT: Fixed the signature of `dtype.__mul__`Bas van Beek2021-06-181-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Multiplication by 0 does not return `None` * Multiplication of a flexible dtype returns a flexible dtype; not just void * In principle any object implementing the `__index__` protocol is a valid multiplication value; not just integers.
| * | | | | | MAINT: Removed a duplicate attributeBas van Beek2021-06-181-2/+0
| | | | | | |
| * | | | | | ENH: Use the concrete `MappingProxyType` class over the `Mapping` ABCBas van Beek2021-06-181-3/+3
| | | | | | |
| * | | | | | STY: Use the pipe operator to represent Unions in `np.dtype`Bas van Beek2021-06-181-8/+8
| |/ / / / /
* | | | | | BUG: Fix refcount leak in ResultTypeSebastian Berg2021-06-181-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This slightly reorganizes the error path handling (duplicating the freeing for the non-error path). It just seemed a bit clearer.
* | | | | | BUG: Add missing DECREF in new pathSebastian Berg2021-06-181-0/+1
|/ / / / / | | | | | | | | | | | | | | | Pretty, harmless reference count leak (the method is a singleton)
* | | | | Merge pull request #19258 from seberg/maint-ufunc-refactor-iterator-loopSebastian Berg2021-06-171-55/+61
|\ \ \ \ \ | | | | | | | | | | | | MAINT: Refactor and simplify the main ufunc iterator loop code
| * | | | | MAINT: Refactor and simplify the main ufunc iterator loop codeSebastian Berg2021-06-171-55/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simple cleanups to the main ufunc loop code in preparation of larger ones.
* | | | | | Merge pull request #19228 from ganesh-k13/BUG_19187_invalid_dtypes_comparisonMatti Picus2021-06-173-3/+21
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | BUG: Invalid dtypes comparison should not raise `TypeError`
| * | | | | BUG: Removed typing for == and != in dtypesGanesh Kathiresan2021-06-151-2/+0
| | | | | |
| * | | | | TST: Check invalid dtypes for equality | Check TypeError for comparisionsGanesh Kathiresan2021-06-151-9/+14
| | | | | |
| * | | | | BUG: Return NotImplemented for unrecognized dtypesGanesh Kathiresan2021-06-151-14/+1
| | | | | |
| * | | | | TST: Check invalid dtypes comparisonGanesh Kathiresan2021-06-121-0/+13
| | | | | |
| * | | | | BUG: Remove TypeError on invalid dtypes comparisonGanesh Kathiresan2021-06-121-1/+16
| | | | | |
* | | | | | Merge pull request #19254 from seberg/maint-ufunc-output-wrappingCharles Harris2021-06-171-56/+80
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: Refactor output ufunc wrapping logic
| * | | | | | MAINT: Refactor output ufunc wrapping logicSebastian Berg2021-06-151-56/+80
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | This replaces the output wrapping logic to work towards (and simplify) the big ufunc refactor for NEP 43.
* | | | | | Merge pull request #19251 from pearu/gh-18431-string_from_pyobj-2Charles Harris2021-06-175-68/+310
|\ \ \ \ \ \ | | | | | | | | | | | | | | BUG: revise string_from_pyobj/try_pyarr_from_string with respect to malloc and copy (the second round)