Skip to content

Commit c86185b

Browse files
committed
Use np.allclose to compare the affine_transformation with the identity matrix
1 parent 7d0f80a commit c86185b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/streamlines/tractogram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def streamlines(self):
545545
streamlines_gen = (t.streamline for t in self._data())
546546

547547
# Check if we need to apply an affine.
548-
if not np.all(self._affine_to_apply == np.eye(4)):
548+
if not np.allclose(self._affine_to_apply, np.eye(4)):
549549
def _apply_affine():
550550
for s in streamlines_gen:
551551
yield apply_affine(self._affine_to_apply, s)

0 commit comments

Comments
 (0)