summaryrefslogtreecommitdiff
path: root/numpy/typing/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #22786 from asmeurer/linalg-namedtuplesHEADmainCharles Harris2023-05-171-15/+15
|\ | | | | ENH: Add namedtuple return types to linalg functions that return tuples
| * TYP: Update type annotations for the new linalg named tuplesBas van Beek2023-05-171-15/+15
| |
* | TYP: Relax the `genfromtxt` return dtype when the dtype is unspecifiedBas van Beek2023-05-161-5/+5
| |
* | Merge branch 'main' into deprecate-find-common-typeCharles Harris2023-05-1316-231/+24
|\ \
| * | TYP: Re-export the `np.dtypes` namespaceBas van Beek2023-05-081-0/+1
| | | | | | | | | | | | xref https://github.com/numpy/numpy/pull/23358
| * | TYP: Add the `np.exceptions` namespace and add `DTypePromotionError`Bas van Beek2023-05-081-0/+1
| | | | | | | | | | | | | | | | | | Xref https://github.com/numpy/numpy/pull/22644 and https://github.com/numpy/numpy/pull/22707 Update modules.pyi
| * | TYP: Let `np.einsum` accept `object` dtypesBas van Beek2023-05-082-4/+4
| | | | | | | | | | | | xref https://github.com/numpy/numpy/pull/18053
| * | Merge pull request #22493 from mwtoews/maint-openSebastian Berg2023-04-281-1/+1
| |\ \ | | | | | | | | MAINT: remove redundant open() modes and io.open() alias
| | * | MAINT: remove redundant open() modes and io.open() aliasMike Taves2022-10-291-1/+1
| | | |
| * | | BUG: Use output when given on numpy.dot C-API branch (#23459)Pedro Lameiras2023-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | MAINT: cleanup unused Python3.8-only code and referencesClément Robert2023-03-142-9/+3
| | | |
| * | | MAINT, DOC: string_ → bytes_ and unicode_ → str_Dimitri Papadopoulos2023-02-103-5/+5
| | | |
| * | | MAINT: Remove `npt._GenericAlias` in favor of py39 `types.GenericAlias`BvB932023-02-021-188/+0
| | | |
| * | | MAINT: Remove all nose testing support.Charles Harris2023-01-191-2/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NumPy switched to using pytest in 2018 and nose has been unmaintained for many years. We have kept NumPy's nose support to avoid breaking downstream projects who might have been using it and not yet switched to pytest or some other testing framework. With the arrival of Python 3.12, unpatched nose will raise an error. It it time to move on. Decorators removed - raises - slow - setastest - skipif - knownfailif - deprecated - parametrize - _needs_refcount These are not to be confused with pytest versions with similar names, e.g., pytest.mark.slow, pytest.mark.skipif, pytest.mark.parametrize. Functions removed - Tester - import_nose - run_module_suite
| * | 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
* | | DEP,TYP: Remove `find_common_type` typing stubs and testsSebastian Berg2022-11-073-9/+0
|/ /
* | 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
| |