Skip to content

Commit 22dc927

Browse files
author
Luke Shaw
committed
Handle scalar calculations
1 parent a4a7b4c commit 22dc927

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
@@ -3121,7 +3121,7 @@ def _new_expr(cls, expression, operands, guess, out=None, where=None, ne_args=No
31213121
# substitutes with dummy operands (cheap for reductions) and
31223122
# defaults to blosc2 functions (cheap for constructors)
31233123
new_expr = _numpy_eval_expr(desliced_expr, desliced_ops, prefer_blosc=True)
3124-
_dtype = new_expr.dtype
3124+
_dtype = new_expr.dtype if hasattr(new_expr, "dtype") else np.dtype(type(new_expr))
31253125
if isinstance(new_expr, blosc2.LazyExpr):
31263126
# DO NOT restore the original expression and operands
31273127
# Instead rebase operands and restore only constructors

0 commit comments

Comments
 (0)