diff --git a/src/blosc2/lazyexpr.py b/src/blosc2/lazyexpr.py index 8df4c6807..df5a26f4e 100644 --- a/src/blosc2/lazyexpr.py +++ b/src/blosc2/lazyexpr.py @@ -1673,7 +1673,7 @@ def slices_eval_getitem( def infer_reduction_dtype(dtype, operation): # It may change in the future, but mostly array-api compliant my_float = np.result_type( - dtype, np.float32 if dtype == np.float32 or dtype == np.complex64 else blosc2.DEFAULT_FLOAT + dtype, np.float32 if dtype in (np.float32, np.complex64) else blosc2.DEFAULT_FLOAT ) if operation in {ReduceOp.SUM, ReduceOp.PROD}: if np.issubdtype(dtype, np.unsignedinteger):