Skip to content

Commit ca95595

Browse files
committed
enh: test __repr__ overwrite
1 parent de1f122 commit ca95595

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

nitransforms/linear.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,20 @@ def from_filename(cls, filename, fmt="X5", reference=None, moving=None):
230230
return cls(matrix, reference=reference)
231231

232232
def __repr__(self):
233+
"""
234+
Change representation to the internal matrix.
235+
236+
Example
237+
-------
238+
>>> Affine([
239+
... [1, 0, 0, 4], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]
240+
... ]) # doctest: +NORMALIZE_WHITESPACE
241+
array([[1, 0, 0, 4],
242+
[0, 1, 0, 0],
243+
[0, 0, 1, 0],
244+
[0, 0, 0, 1]])
245+
246+
"""
233247
return repr(self.matrix)
234248

235249

0 commit comments

Comments
 (0)