Skip to content

Commit

Permalink
enh: add @effigies' example
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban authored Jul 19, 2022
1 parent 533a03d commit 66bd6b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nitransforms/manip.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ def asaffine(self, indices=None):
[0., 0., 1., 0.],
[0., 0., 0., 1.]])
>>> chain = TransformChain(transforms=[
... Affine.from_matvec(vec=(1, 2, 3)),
... Affine.from_matvec(mat=[[0, 1, 0], [0, 0, 1], [1, 0, 0]]),
... ])
>>> chain.asaffine()
array([[0., 1., 0., 2.],
[0., 0., 1., 3.],
[1., 0., 0., 1.],
[0., 0., 0., 1.]])
Parameters
----------
indices : :obj:`numpy.array_like`
Expand Down

0 comments on commit 66bd6b2

Please sign in to comment.