summaryrefslogtreecommitdiff
path: root/numpy/typing/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #22316 from seberg/void-strctured-newSebastian Berg2022-11-212-2/+5
|\ | | | | ENH: Allow creating structured void scalars by passing dtype
| * ENH: Allow creating structured void scalars by passing dtypeSebastian Berg2022-09-212-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Adds an optional `dtype=` kwarg to `np.void`. If given (and not None), this kwarg effectively turns it into: res = np.array(data, dtype=dtype)[()] Thanks for Marten's review and Bas' help with the typing. Reviewed-by: Marten van Kerkwijk <mhvk@astro.utoronto.ca> Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* | TYP: Remove newly deprecated scalar type aliasesSebastian Berg2022-11-172-15/+0
| |
* | TYP,DEP: Remove `msort` annotationsBvB932022-11-141-4/+0
| | | | | | | | Xref https://github.com/numpy/numpy/pull/22456
* | TYP,ENH: Improve the `dtype`-overload of `stack`, `hstack` and `vstack`BvB932022-11-141-0/+3
| | | | | | | | Xref https://github.com/numpy/numpy/pull/21627
* | TST: Avoid possible warning from unnecessary cast with uninitialized valuesSebastian Berg2022-10-121-1/+1
| | | | | | | | | | This should be fixed in `choose` to not do the unnecessary cast, see gh-22237.
* | Merge pull request #22360 from BvB93/mypyMatti Picus2022-10-023-4/+2
|\ \ | | | | | | TST,TYP: Bump mypy to 0.981
| * | TST,TYP: Bump mypy to 0.981BvB932022-09-303-4/+2
| |/
* | Merge pull request #22358 from BvB93/indexMatti Picus2022-10-021-2/+2
|\ \ | | | | | | ENH,TYP: Add special casing for `ndarray`-based indexing
| * | ENH,TYP: Add special casing for `ndarray`-based indexingBvB932022-09-301-2/+2
| |/
* | TYP,ENH: Mark `numpy.typing` protocols as runtime checkableBvB932022-09-301-1/+32
|/
* TYP: Import into random moduleKevin Sheppard2022-08-111-2/+2
|
* MAINT: Update typing informationKevin Sheppard2022-08-112-0/+6
|
* Merge pull request #21984 from BvB93/comparisonMatti Picus2022-07-171-0/+9
|\ | | | | MAINT,TYP: Add object-overloads for the `np.generic` rich comparisons
| * MAINT,TYP: Add object-overloads for the `np.generic` rich comparisonsBas van Beek2022-07-141-0/+9
| |
* | Merge pull request #21983 from BvB93/einsumMatti Picus2022-07-141-0/+3
|\ \ | |/ |/| TYP,MAINT: Allow `einsum` subscripts to be passed via integer array-likes
| * TYP,MAINT: Allow `einsum` subscripts to be passed via integer array-likesBas van Beek2022-07-141-0/+3
| |
* | MAINT: Do not let `_GenericAlias` wrap the underlying classes `__class__` ↵Bas van Beek2022-07-141-1/+4
|/ | | | | | attribute Adapt to the 3.11b4 changes introduced in https://github.com/python/cpython/pull/93754
* MAINT, TYP: Fix `np.angle` dtype-overloadsBas van Beek2022-07-121-3/+4
|
* ENH: issue overflow warning when using `abs` on `np.int8(-128)` (#21648)Meekail Zain2022-06-131-2/+4
| | | | | | Checks condition a == NPY_MIN_@NAME@ to determine whether an overflow error has occurred for np.int8 type. See #21289 and #21188 (comment) for reference. This also adds error integer overflow handling to the `-scalar` paths and "activates" a test for the unsigned versions. A few tests are skipped, because the tests were buggy (they never ran). These paths require followups to fix.
* TYP: Remove `normed=` from typing stubsSebastian Berg2022-06-021-1/+0
|
* Merge pull request #21605 from BvB93/aliasMatti Picus2022-05-271-3/+40
|\ | | | | MAINT: Adapt the `npt._GenericAlias` backport to Python 3.11 `types.GenericAlias` changes
| * TST: Remove the `__reduce__` testsBas van Beek2022-05-261-2/+0
| | | | | | | | Deliberate divergence w.r.t. CPython
| * TST: Add `npt._GenericAlias` tests for (backported) Python 3.11 featuresBas van Beek2022-05-261-3/+42
| |
* | TYP: Allow unsigned integer inplace-ops to accept signed integersBas van Beek2022-05-251-0/+4
|/ | | | Inplace ops generally use "same_kind" casting w.r.t. to the left operand. An exception to this rule are unsigned integers though, which also accepts a signed integer (array) for the right operand as long as all its values are >=0.
* MAINT: Python <3.8 related cleanupsBrigitta Sipőcz2022-05-232-7/+5
|
* DOC: Add a note about `npt._GenericAlias` >=3.11 stabilityBas van Beek2022-05-201-0/+4
|
* TST,TYP: Fix a python 3.11 failure for the `GenericAlias` testsBas van Beek2022-05-201-2/+2
|
* TYP: Add basic `np.number` overloads for ndarray dundersBas van Beek2022-05-141-1/+4
|
* TYP: Let `ndarray` fancy indexing always return an `ndarray`Bas van Beek2022-04-151-0/+2
|
* MAINT: Explicitly re-export the types in `numpy._typing`Bas van Beek2022-03-181-0/+1
|
* MAINT: Split `numpy.typing` into a public and private componentBas van Beek2022-03-1811-41/+44
| | | | i.e. `numpy.typing` and `numpy._typing`
* Merge pull request #21180 from BvB93/mypyCharles Harris2022-03-1312-62/+62
|\ | | | | TST: Bump mypy from 0.931 to 0.940
| * TST: Adapt to the mypy 0.940 `iter` changesBas van Beek2022-03-113-6/+6
| | | | | | | | xref https://github.com/python/typeshed/pull/6035
| * TST: Adapt to the mypy 0.940 changes in tuple representationBas van Beek2022-03-1112-58/+58
| |
* | MAINT: Relax the `obj` type in `__array_finalize__`Bas van Beek2022-02-233-0/+6
| |
* | MAINT: Remove a leftover `__array_finalize__` property decoratorBas van Beek2022-02-232-0/+6
|/
* TYP,TST: Add tests for known mypy-related false-positivesBas van Beek2022-02-212-0/+21
| | | | These all concern known false positives due to known mypy bugs. If one of these tests break, than that would generally be indicative of a upstream bug fix
* TYP,MAINT: Explicitly allow sequences of array-likes in `np.concatenate`Bas van Beek2022-02-211-0/+5
|
* TYP: Add dtype-typing support to `fromnumeric` part 3Bas van Beek2022-02-142-72/+90
|
* TST: Add more typing tests for `np.core.fromnumeric`Bas van Beek2022-02-092-58/+77
|
* TST,MAINT: Improve a number of variable namesBas van Beek2022-02-091-227/+226
|
* Merge pull request #20902 from BvB93/fromnumericCharles Harris2022-01-272-85/+89
|\ | | | | TYP,ENH: Add dtype-typing support to `np.core.fromnumeric` (part 1)
| * TYP,ENH: Add dtype-typing support to `fromnumeric` (part 1)Bas van Beek2022-01-262-85/+89
| |
* | MAINT: Add annotations for `flatiter.__setitem__`Bas van Beek2022-01-271-0/+4
| |
* | MAINT: Allow `flatiter.__getitem__` to accept 1-tuplesBas van Beek2022-01-271-0/+2
|/
* Merge pull request #20887 from BvB93/aliasesCharles Harris2022-01-242-2/+2
|\ | | | | TYP,MAINT: Add aliases for commonly used unions
| * TST: Fix failing typing testsBas van Beek2022-01-242-2/+2
| |
* | Merge pull request #20885 from BvB93/param_specCharles Harris2022-01-242-0/+6
|\ \ | |/ |/| TYP,ENH: Improve typing with the help of `ParamSpec`
| * ENH: Improve typing with the help of `ParamSpec`Bas van Beek2022-01-242-0/+6
| |