Skip to content

Commit 4fa7994

Browse files
committed
Rename intermediate variable in loop comprehension
1 parent 5667b18 commit 4fa7994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/xtensor/rewriting/indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def lower_index(fgraph, node):
137137
if basic_idx_axis and _non_consecutive_adv_indexing(aligned_idxs):
138138
# Numpy moves advanced indexing dimensions to the front when they are not consecutive
139139
# We need to transpose them back to the expected output order
140-
x_tensor_indexed_basic_dims = [out_dims[idx] for idx in basic_idx_axis]
140+
x_tensor_indexed_basic_dims = [out_dims[axis] for axis in basic_idx_axis]
141141
x_tensor_indexed_dims = [
142142
dim for dim in out_dims if dim not in x_tensor_indexed_basic_dims
143143
] + x_tensor_indexed_basic_dims

0 commit comments

Comments
 (0)