diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2020-10-12 14:50:07 +0200 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2020-10-17 18:05:12 +0200 |
commit | 1816e44ec688dfb8f9683ecb41f069520a306a89 (patch) | |
tree | 5438625833a2d278124cf036e9bb327ed4c7465f /numpy/typing/_callable.py | |
parent | c53797e838f002b14e0d33c9651bffecd9934404 (diff) | |
download | numpy-1816e44ec688dfb8f9683ecb41f069520a306a89.tar.gz |
ENH: Make `complexfloating` generic w.r.t 2 typevars
Diffstat (limited to 'numpy/typing/_callable.py')
-rw-r--r-- | numpy/typing/_callable.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/numpy/typing/_callable.py b/numpy/typing/_callable.py index bc58f2774..f75828a7a 100644 --- a/numpy/typing/_callable.py +++ b/numpy/typing/_callable.py @@ -199,8 +199,12 @@ if TYPE_CHECKING or HAVE_PROTOCOL: @overload def __call__( self, - __other: Union[integer[_NBit_co], floating[_NBit_co], complexfloating[_NBit_co]] - ) -> complexfloating[_NBit_co]: ... + __other: Union[ + integer[_NBit_co], + floating[_NBit_co], + complexfloating[_NBit_co, _NBit_co], + ] + ) -> complexfloating[_NBit_co, _NBit_co]: ... class _NumberOp(Protocol): def __call__(self, __other: _NumberLike) -> number: ... |