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):
322322 default_float = xp .asarray (float ()).dtype
323323 if default_float not in real_float_dtypes :
324324 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 )):
329326 default_complex = xp .asarray (complex ()).dtype
330327 if default_complex not in complex_dtypes :
331328 warn (
332329 f"inferred default complex is { default_complex !r} , "
333330 "which is not a complex"
334331 )
332+ else :
333+ default_complex = None
335334
336335if dtype_nbits [default_int ] == 32 :
337336 default_uint = _name_to_dtype .get ("uint32" )
You can’t perform that action at this time.
0 commit comments