Skip to content

Commit 870f106

Browse files
Use enumerate to iterate over voxels
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 60e1ca2 commit 870f106

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nibabel/cifti2/cifti2_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,8 @@ def __init__(self, name, voxels, vertices, affine=None, volume_shape=None, nvert
776776
"""
777777
self.name = np.asanyarray(name, dtype='U')
778778
self.voxels = np.empty(len(voxels), dtype='object')
779-
for idx in range(len(voxels)):
780-
self.voxels[idx] = voxels[idx]
779+
for idx, vox in enumerate(voxels):
780+
self.voxels[idx] = vox
781781
self.vertices = np.asanyarray(vertices, dtype='object')
782782
self.affine = np.asanyarray(affine) if affine is not None else None
783783
self.volume_shape = volume_shape

0 commit comments

Comments
 (0)