Skip to content

Commit b0599a6

Browse files
committed
fix: remove unexercised code path with duplicate responsibility
After all, it is ``linear.load()`` where the downcast to ``Affine`` happens if only one transform is in the array.
1 parent 852b02d commit b0599a6

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

nitransforms/linear.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,6 @@ def from_filename(cls, filename, fmt=None, reference=None, moving=None):
230230
continue
231231

232232
matrix = struct.to_ras(reference=reference, moving=moving)
233-
234-
# Process matrix
235-
if not is_array and np.ndim(matrix) == 3:
236-
if np.shape(matrix)[0] != 1:
237-
raise TypeError("Cannot load transform array '%s'" % filename)
238-
matrix = matrix[0]
239-
240233
return cls(matrix, reference=reference)
241234

242235
raise TransformFileError(

0 commit comments

Comments
 (0)