summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2022-01-15 11:38:46 -0700
committerGitHub <noreply@github.com>2022-01-15 11:38:46 -0700
commit098cba9b911fb2e31284014651a213373c2f3f9e (patch)
treec4bef98e58e9046f7de22f0b68098c462ee8ec4e
parentf40b105d627096ef04ca7a5ccbcd6ff53d810be6 (diff)
parentab05f0beb9d734cae63f0f317ba00c7ae55e560e (diff)
downloadnumpy-098cba9b911fb2e31284014651a213373c2f3f9e.tar.gz
Merge pull request #20827 from BvB93/real
TYP: Fix pyright being unable to infer the `real` and `imag` output type
-rw-r--r--numpy/__init__.pyi4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi
index 8e92e0f42..451a29a02 100644
--- a/numpy/__init__.pyi
+++ b/numpy/__init__.pyi
@@ -1451,13 +1451,13 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
def size(self) -> int: ...
@property
def real(
- self: NDArray[_SupportsReal[_ScalarType]], # type: ignore[type-var]
+ self: ndarray[_ShapeType, dtype[_SupportsReal[_ScalarType]]], # type: ignore[type-var]
) -> ndarray[_ShapeType, _dtype[_ScalarType]]: ...
@real.setter
def real(self, value: ArrayLike) -> None: ...
@property
def imag(
- self: NDArray[_SupportsImag[_ScalarType]], # type: ignore[type-var]
+ self: ndarray[_ShapeType, dtype[_SupportsImag[_ScalarType]]], # type: ignore[type-var]
) -> ndarray[_ShapeType, _dtype[_ScalarType]]: ...
@imag.setter
def imag(self, value: ArrayLike) -> None: ...