| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
TST: Clean up the errors of the typing tests
|
| | |
|
|\ \
| | |
| | | |
MAINT: Update the annotations in `np.core.numeric`
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
ENH: Make `np.number` generic with respect to its precision
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Mypy uses a `*` whenever an annotation or one of its parameters is based on a TypeVar.
Its added value is neglible and it unnecessarily complicates the `reveal` tests so lets just ignore them.
Note that this is done after running mypy, so it won't affect cases where `*` is used as multiplication operator.
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Removed redundant `type: ignore` messages
* Set the return precision as `Union[_NBit_co, _NBit]`
* Type the precision of `builtins.int` operations as `Any`
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
ENH: Add annotations for three new constants
|
| | | |
|
|\ \ \
| |/ /
|/| | |
ENH: make dtype generic over scalar type
|
| | | |
|
| |/
| |
| |
| |
| | |
This allows representing dtype subclasses via constructs like
`np.dtype[np.float64]`.
|
|\ \
| | |
| | | |
ENH: type np.unicode_ as np.str_
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The two are aliases; i.e.
>>> np.unicode_ is np.str_
True
so make them aliases on the typing level too.
|
|\ \ \
| | | |
| | | | |
ENH: Add annotations for bitwise operations
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Unfortunately the likes of `self: uint64` don't work with protocols.
Revisit this once we add proper support for numerical precision.
|
| | | | |
|
| |/ / |
|
|\ \ \
| |_|/
|/| | |
MAINT: Remove duplicate placeholder annotations
|
| |/ |
|
|/
|
| |
* MAINT: Move the `<scalar>Like` unions to `numpy.typing`
|
|\
| |
| | |
ENH: Add annotations for remaining `ndarray` / `generic` non-magic methods
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* ENH: Added annotations for arithmetic-based magic methods
* TST: Added arithmetic tests
* TST: Moved a number of tests to `arithmetic.py`
* ENH: Ensure that objects annotated as `number` support arithmetic operations
* MAINT: Arithmetic operations on 0d arrays return scalars
* MAINT: Clarify the type of generics returned by `ufunc.__call__`
* TST: Added more arithmetic tests
* MAINT: Use `_CharLike` when both `str` and `bytes` are accepted
* MAINT: Change the `timedelta64` baseclass to `generic`
* MAINT: Add aliases for common scalar unions
* MAINT: Update the defition of `_NumberLike`
* MAINT: Replace `_NumberLike` with `_ComplexLike` in the `complexfloating` annotations
* MAINT: Move the callback protocols to their own module
* MAINT: Make `typing._callback` available at runtime
* DOC: Provide further clarification about callback protocols
* MAINT: Replace `_callback` with `_callable`
Addresses https://github.com/numpy/numpy/pull/17273#discussion_r485821346
The use of `__call__`-defining protocols is not limited to callbacks. The module name name & docstring now reflects this.
* MAINT: Removed `__add__` from `str_` and `bytes_`
Most `np.bytes_` / `np.str_` methods return their builtin `bytes` / `str` counterpart.
This includes addition.
* MAINT: Fix the return type of boolean division
Addresses https://github.com/numpy/numpy/pull/17273#discussion_r486271220
Dividing a `np.bool_` by an integer (or vice versa) always returns `float64`
* MAINT: Renamed all `_<x>Arithmetic` protocols to `_<x>Op
Addresses https://github.com/numpy/numpy/pull/17273#discussion_r486272745
* TST: Add tests for boolean division
* ENH: Make `np.number` generic w.r.t. its precision
* ENH,WIP: Add a mypy plugin for casting `np.number` instances to appropiate subclasses
* Revert "ENH,WIP: Add a mypy plugin for casting `np.number` instances to appropiate subclasses"
This reverts commit c526fb619d20902bfd77709c8983c7a7d5477c95.
* Revert "ENH: Make `np.number` generic w.r.t. its precision"
This reverts commit dbf20183cf7ff71e379cd1a165d07e1a1d643135.
* MAINT: Narow the definition of `_ComplexLike`
Addresses https://github.com/numpy/numpy/pull/17273#discussion_r490440238
* MAINT: Refined the return type of `unint + int` ops
`unsignedinteger + signedinteger` generally returns a `signedinteger` subclass.
The exception to this is `uint64 + signedinteger`, which returns `float64`.
Addresses https://github.com/numpy/numpy/pull/17273#discussion_r490442023
* MAINT: Use `_IntLike` and `_FloatLike` in the definition of `_ComplexLike`
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
indeed results in an error
|
| |
| |
| |
| |
| |
| | |
results in an error."
This reverts commit 0996962236506342d16730580e126efe2dfbf98d.
|
|/
|
|
| |
in an error.
|
|
|
|
| |
Move them into a new `numpy/typing/tests directory`
|