Skip to content

Commit

Permalink
Change dtype=None behavior in sum/prod following data-apis/array-api#744
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite committed Dec 19, 2024
1 parent e60d368 commit f77aee6
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions cubed/array_api/statistical_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
_real_numeric_dtypes,
_signed_integer_dtypes,
_unsigned_integer_dtypes,
complex64,
complex128,
float32,
float64,
int64,
uint64,
)
Expand Down Expand Up @@ -128,10 +124,6 @@ def prod(x, /, *, axis=None, dtype=None, keepdims=False, split_every=None):
dtype = int64
elif x.dtype in _unsigned_integer_dtypes:
dtype = uint64
elif x.dtype == float32:
dtype = float64
elif x.dtype == complex64:
dtype = complex128
else:
dtype = x.dtype
extra_func_kwargs = dict(dtype=dtype)
Expand Down Expand Up @@ -169,10 +161,6 @@ def sum(x, /, *, axis=None, dtype=None, keepdims=False, split_every=None):
dtype = int64
elif x.dtype in _unsigned_integer_dtypes:
dtype = uint64
elif x.dtype == float32:
dtype = float64
elif x.dtype == complex64:
dtype = complex128
else:
dtype = x.dtype
extra_func_kwargs = dict(dtype=dtype)
Expand Down

0 comments on commit f77aee6

Please sign in to comment.