Skip to content

Commit e8bb760

Browse files
committed
Small refactor for ne_evaluate
1 parent 12c5e2c commit e8bb760

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/blosc2/lazyexpr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def ne_evaluate(expression, local_dict=None, **kwargs):
112112
res = eval(expression, safe_blosc2_globals, local_dict)
113113
if "out" in kwargs:
114114
out = kwargs.pop("out")
115-
out[:] = res[()] if isinstance(res, blosc2.LazyArray) else res
115+
out[:] = res # will handle calc/decomp if res is lazyarray
116116
return out
117-
return res[()] if isinstance(res, blosc2.LazyArray) else res
117+
return res[()] if isinstance(res, blosc2.Operand) else res
118118

119119

120120
# Define empty ndindex tuple for function defaults

0 commit comments

Comments
 (0)