Skip to content

Commit 09166ef

Browse files
oestebaneffigies
andcommitted
fix: remove unnecessary .copy() of ndarrays
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 6696caa commit 09166ef

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

nitransforms/io/afni.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ def to_string(self, banner=True):
3535

3636
@classmethod
3737
def from_ras(cls, ras, moving=None, reference=None):
38-
"""Create an ITK affine from a nitransform's RAS+ matrix."""
39-
ras = ras.copy()
40-
pre = LPS.copy()
41-
post = LPS.copy()
38+
"""Create an AFNI affine from a nitransform's RAS+ matrix."""
39+
pre = LPS
40+
post = LPS
4241

4342
if reference is not None:
4443
reference = _ensure_image(reference)
@@ -94,8 +93,8 @@ def from_string(cls, string):
9493

9594
def to_ras(self, moving=None, reference=None):
9695
"""Return a nitransforms internal RAS+ matrix."""
97-
pre = LPS.copy()
98-
post = LPS.copy()
96+
pre = LPS
97+
post = LPS
9998

10099
if reference is not None:
101100
reference = _ensure_image(reference)

0 commit comments

Comments
 (0)