File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -322,16 +322,15 @@ def accumulation_result_dtype(x_dtype, dtype_kwarg):
322
322
default_float = xp .asarray (float ()).dtype
323
323
if default_float not in real_float_dtypes :
324
324
warn (f"inferred default float is { default_float !r} , which is not a float" )
325
-
326
- if not (hasattr (xp , "complex32" ) or hasattr (xp , "complex64" )):
327
- default_complex = None
328
- else :
325
+ if api_version > "2021.12" and ({'complex64' , 'complex128' } - set (skip_dtypes )):
329
326
default_complex = xp .asarray (complex ()).dtype
330
327
if default_complex not in complex_dtypes :
331
328
warn (
332
329
f"inferred default complex is { default_complex !r} , "
333
330
"which is not a complex"
334
331
)
332
+ else :
333
+ default_complex = None
335
334
336
335
if dtype_nbits [default_int ] == 32 :
337
336
default_uint = _name_to_dtype .get ("uint32" )
You can’t perform that action at this time.
0 commit comments