Skip to content

Commit 10fb6a9

Browse files
committed
compiler: Fix bad loop in data.py
1 parent e8c1bed commit 10fb6a9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

devito/data/data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ def __getitem__(self, glb_idx, comm_type, gather_rank=None):
241241
idx = [slice(r.start - d.glb_min, r.stop - d.glb_min, r.step)
242242
for r, d in zip(self._distributor.all_ranges[i],
243243
self._distributor.decomposition)]
244-
for i in range(len(self.shape) - len(self._distributor.glb_shape)):
245-
shape.insert(i, glb_shape[i])
246-
idx.insert(i, slice(0, glb_shape[i]+1, 1))
244+
for j in range(len(self.shape) - len(self._distributor.glb_shape)):
245+
shape.insert(j, glb_shape[j])
246+
idx.insert(j, slice(0, glb_shape[j]+1, 1))
247247
retval[tuple(idx)] = data_slice.reshape(tuple(shape))
248248
return retval
249249
else:

0 commit comments

Comments
 (0)