Skip to content

Commit 4cbbc73

Browse files
always rewrite tuples
1 parent 67126c6 commit 4cbbc73

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

python/egglog/exp/array_api.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,9 @@ def _tuple_int_create_from_vec(
364364
# yield rewrite(x.index(TupleInt(3, idx_fn))).to(
365365
# x.index(TupleInt.from_vec(Vec(idx_fn(Int(0)), idx_fn(Int(1)), idx_fn(Int(2)))))
366366
# )
367-
yield rewrite(x.index(TupleInt(4, idx_fn))).to(
368-
x.index(
369-
TupleInt.from_vec(Vec(idx_fn(Int(0)), idx_fn(Int(1)), idx_fn(Int(2)), idx_fn(Int(3))))
370-
# TupleInt.EMPTY.append(idx_fn(Int(0))).append(idx_fn(Int(1))).append(idx_fn(Int(2))).append(idx_fn(Int(3)))
371-
)
367+
yield rewrite(TupleInt(4, idx_fn)).to(
368+
TupleInt.from_vec(Vec(idx_fn(Int(0)), idx_fn(Int(1)), idx_fn(Int(2)), idx_fn(Int(3))))
369+
# TupleInt.EMPTY.append(idx_fn(Int(0))).append(idx_fn(Int(1))).append(idx_fn(Int(2))).append(idx_fn(Int(3)))
372370
)
373371

374372

0 commit comments

Comments
 (0)