File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -92,15 +92,15 @@ def imag(val: _nt.ToGeneric_nd) -> _nt.Array: ...
92
92
93
93
#
94
94
@overload
95
- def iscomplex (x : _nt .ToGeneric_0d ) -> np .bool : ...
96
- @overload
97
95
def iscomplex (x : _nt .ToGeneric_1nd ) -> _nt .Array [np .bool ]: ...
96
+ @overload
97
+ def iscomplex (x : np .generic | _nt ._PyScalar ) -> np .bool : ...
98
98
99
99
#
100
100
@overload
101
- def isreal (x : _nt .ToGeneric_0d ) -> np .bool : ...
102
- @overload
103
101
def isreal (x : _nt .ToGeneric_1nd ) -> _nt .Array [np .bool ]: ...
102
+ @overload
103
+ def isreal (x : np .generic | _nt ._PyScalar ) -> np .bool : ...
104
104
105
105
#
106
106
def iscomplexobj (x : _HasDType [Any ] | _nt .ToGeneric_nd ) -> bool : ...
@@ -131,13 +131,13 @@ def nan_to_num(
131
131
# If one passes a complex array to `real_if_close`, then one is reasonably
132
132
# expected to verify the output dtype (so we can return an unsafe union here)
133
133
134
- @overload
135
- def real_if_close (a : _nt .ToCLongDouble_nd , tol : float = 100 ) -> _nt .Array [_nt .inexact64l ]: ...
136
134
@overload
137
135
def real_if_close (a : _nt .ToComplex128_nd , tol : float = 100 ) -> _nt .Array [_nt .inexact64 ]: ...
138
136
@overload
139
137
def real_if_close (a : _nt .ToComplex64_nd , tol : float = 100 ) -> _nt .Array [_nt .inexact32 ]: ...
140
138
@overload
139
+ def real_if_close (a : _nt .ToCLongDouble_nd , tol : float = 100 ) -> _nt .Array [_nt .inexact64l ]: ...
140
+ @overload
141
141
def real_if_close (a : _nt ._ToArray_nd [_RealT ], tol : float = 100 ) -> _nt .Array [_RealT ]: ...
142
142
@overload
143
143
def real_if_close (a : _nt .ToGeneric_nd , tol : float = 100 ) -> _nt .Array : ...
You can’t perform that action at this time.
0 commit comments