We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7d8696 commit c94b85cCopy full SHA for c94b85c
src/blosc2/lazyexpr.py
@@ -1663,6 +1663,7 @@ def slices_eval_getitem(
1663
ne_args = {}
1664
where: dict | None = kwargs.pop("_where_args", None)
1665
1666
+ dtype = kwargs.pop("dtype", None)
1667
if out is None:
1668
# Compute the shape and chunks of the output array, including broadcasting
1669
shape = compute_broadcast_shape(operands.values())
@@ -1700,7 +1701,7 @@ def slices_eval_getitem(
1700
1701
result = ne_evaluate(new_expr, slice_operands, **ne_args)
1702
1703
if out is None: # avoid copying unnecessarily
- return result
1704
+ return result.astype(dtype, copy=False) if dtype else result
1705
else:
1706
out[()] = result
1707
return out
0 commit comments