File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,8 @@ def isposinf(x, out=None):
189
189
try :
190
190
signbit = ~ nx .signbit (x )
191
191
except TypeError as e :
192
- raise TypeError ('This operation is not supported for complex values '
192
+ dtype = nx .asanyarray (x ).dtype
193
+ raise TypeError (f'This operation is not supported for { dtype } values '
193
194
'because it would be ambiguous.' ) from e
194
195
else :
195
196
return nx .logical_and (is_inf , signbit , out )
@@ -260,7 +261,8 @@ def isneginf(x, out=None):
260
261
try :
261
262
signbit = nx .signbit (x )
262
263
except TypeError as e :
263
- raise TypeError ('This operation is not supported for complex values '
264
+ dtype = nx .asanyarray (x ).dtype
265
+ raise TypeError (f'This operation is not supported for { dtype } values '
264
266
'because it would be ambiguous.' ) from e
265
267
else :
266
268
return nx .logical_and (is_inf , signbit , out )
You can’t perform that action at this time.
0 commit comments