Skip to content

Commit

Permalink
Merge pull request #18 from mu40/fix-submatrix
Browse files Browse the repository at this point in the history
Fix bug preventing affine creation from (N, N+1) matrix.
  • Loading branch information
avnishks authored Dec 15, 2023
2 parents 0842291 + cdda58e commit 3c9cf58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions surfa/transform/affine.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Affine:

def __init__(self, matrix, source=None, target=None, space=None):
"""
N-D linear transform, represented by an (N, N) affine matrix, that
N-D transform, represented by an (N+1, N+1) affine matrix, that
tracks source and target geometries as well as coordinate space.
Parameters
Expand Down Expand Up @@ -90,7 +90,7 @@ def matrix(self, mat):

# conform to square matrix
square = np.eye(ndim + 1)
square[: square.shape[0], :] = mat
square[: mat.shape[0], :] = mat
self._matrix = square

def __array__(self):
Expand Down

0 comments on commit 3c9cf58

Please sign in to comment.