Skip to content

Commit 28beee3

Browse files
committed
Use a SimpleProxy for avoiding unnecessary copies
1 parent 6c9856c commit 28beee3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/blosc2/lazyexpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3140,7 +3140,7 @@ def _new_expr(cls, expression, operands, guess, out=None, where=None, ne_args=No
31403140
# Check that operands are proper Operands, LazyArray or scalars; if not, convert to NDArray objects
31413141
for op, val in _operands.items():
31423142
if not (isinstance(val, (blosc2.Operand, blosc2.LazyArray, np.ndarray)) or np.isscalar(val)):
3143-
_operands[op] = blosc2.asarray(val)
3143+
_operands[op] = blosc2.SimpleProxy(val)
31443144
new_expr = eval(_expression, _globals, _operands)
31453145
_dtype = new_expr.dtype
31463146
_shape = new_expr.shape

0 commit comments

Comments
 (0)