fix tensor()

This commit is contained in:
mcDandy
2026-06-20 14:39:04 +02:00
parent 06f5859f60
commit 243e449ae0
+2 -2
View File
@@ -2957,9 +2957,9 @@ class UnifiedMathVisitor(MathExprVisitor):
shape_val = yield ctx.indexExpr()
if self._is_list(shape_val):
shape = self._to_int(v, ctx, "tensor")
shape = self._to_int(shape_val, ctx, "tensor")
elif self._is_tensor(shape_val):
shape = self._to_int(v, ctx, "tensor").flatten().tolist()
shape = self._to_int(shape_val, ctx, "tensor").flatten().tolist()
else:
shape = [self._to_int(shape_val, ctx, "tensor")]