File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def io_orientation(affine, tol=None):
62
62
P , S , Qs = npl .svd (RS )
63
63
# Threshold the singular values to determine the rank.
64
64
if tol is None :
65
- tol = S .max () * max (S .shape ) * np .finfo (S .dtype ).eps
65
+ tol = S .max () * max (RS .shape ) * np .finfo (S .dtype ).eps
66
66
keep = (S > tol )
67
67
R = np .dot (P [:, keep ], Qs [keep ])
68
68
# the matrix R is such that np.dot(R,R.T) is projection onto the
@@ -75,7 +75,7 @@ def io_orientation(affine, tol=None):
75
75
ornt = np .ones ((p , 2 ), dtype = np .int8 ) * np .nan
76
76
for in_ax in range (p ):
77
77
col = R [:, in_ax ]
78
- if not np .alltrue (np .equal (col , 0 )):
78
+ if not np .alltrue (np .allclose (col , 0 )):
79
79
out_ax = np .argmax (np .abs (col ))
80
80
ornt [in_ax , 0 ] = out_ax
81
81
assert col [out_ax ] != 0
You can’t perform that action at this time.
0 commit comments