| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Previously it was already a stub-only file in all but name
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
PEP 604 -- Allow writing union types as X | Y
|
| |
|
|
|
|
| |
`typing_extensions` is available
|
| |
|
| |
|
| |
|
|\
| |
| | |
ENH: Add a mypy plugin for exposing platform-specific extended-precision types
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ENH: Added `_ArrayLikeNumber`
* ENH: Added dtype support to the array comparison ops
* MAINT: Made `dtype` and `ndarray` covariant
The dtypes scalar-type and ndarrays' dtype are now covariant instead of invariant.
This change is necasary in order to ensure that all generic subclasses can be used as underlying scalar type.
* TST: Updated the comparison typing tests
* MAINT: Fixed an issue where certain `array > arraylike` operations where neglected
More specifically operations between array-likes of `timedelta64` and `ndarray`s that can be cast into `timedelta64`.
For example:
ar_i = np.array([1])
seq_m = [np.timedelta64()]
ar_i > seq_m
|
| |
|
| |
|
|
|
|
| |
`_BoolLike_co` is already a subtype of `_IntLike_co`, no nead the use an explicit union here
|
| |
|
|\
| |
| | |
ENH: Add two new `_<X>Like` unions
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* 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 bitwise operations
|
| |
| |
| |
| |
| |
| | |
Unfortunately the likes of `self: uint64` don't work with protocols.
Revisit this once we add proper support for numerical precision.
|
| | |
|
|/
|
| |
* MAINT: Move the `<scalar>Like` unions to `numpy.typing`
|
|
* 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`
|