Skip to content

Commit 66bd6b2

Browse files
authored
enh: add @effigies' example
1 parent 533a03d commit 66bd6b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

nitransforms/manip.py

+10
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@ def asaffine(self, indices=None):
156156
[0., 0., 1., 0.],
157157
[0., 0., 0., 1.]])
158158
159+
>>> chain = TransformChain(transforms=[
160+
... Affine.from_matvec(vec=(1, 2, 3)),
161+
... Affine.from_matvec(mat=[[0, 1, 0], [0, 0, 1], [1, 0, 0]]),
162+
... ])
163+
>>> chain.asaffine()
164+
array([[0., 1., 0., 2.],
165+
[0., 0., 1., 3.],
166+
[1., 0., 0., 1.],
167+
[0., 0., 0., 1.]])
168+
159169
Parameters
160170
----------
161171
indices : :obj:`numpy.array_like`

0 commit comments

Comments
 (0)