Skip to content

Commit f77aee6

Browse files
committed
Change dtype=None behavior in sum/prod following data-apis/array-api#744
1 parent e60d368 commit f77aee6

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

cubed/array_api/statistical_functions.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
_real_numeric_dtypes,
88
_signed_integer_dtypes,
99
_unsigned_integer_dtypes,
10-
complex64,
11-
complex128,
12-
float32,
13-
float64,
1410
int64,
1511
uint64,
1612
)
@@ -128,10 +124,6 @@ def prod(x, /, *, axis=None, dtype=None, keepdims=False, split_every=None):
128124
dtype = int64
129125
elif x.dtype in _unsigned_integer_dtypes:
130126
dtype = uint64
131-
elif x.dtype == float32:
132-
dtype = float64
133-
elif x.dtype == complex64:
134-
dtype = complex128
135127
else:
136128
dtype = x.dtype
137129
extra_func_kwargs = dict(dtype=dtype)
@@ -169,10 +161,6 @@ def sum(x, /, *, axis=None, dtype=None, keepdims=False, split_every=None):
169161
dtype = int64
170162
elif x.dtype in _unsigned_integer_dtypes:
171163
dtype = uint64
172-
elif x.dtype == float32:
173-
dtype = float64
174-
elif x.dtype == complex64:
175-
dtype = complex128
176164
else:
177165
dtype = x.dtype
178166
extra_func_kwargs = dict(dtype=dtype)

0 commit comments

Comments
 (0)