-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Description
In the next Numpy's release, boolean index must match indexed array along specified dimension.
See https://travis-ci.org/nipy/nibabel/jobs/186167556#L1230
From https://github.com/nipy/nibabel/blob/master/nibabel/orientations.py#L71
P, S, Qs = npl.svd(RS)
# Threshold the singular values to determine the rank.
if tol is None:
tol = S.max() * max(RS.shape) * np.finfo(S.dtype).eps
keep = (S > tol)
R = np.dot(P[:, keep], Qs[keep])
When RS
is not square, keep
will have a dimension less than either P
's columns or Qs
' rows, therefore indexing using keep
will raise an error. I haven't examine the code but maybe we could use full_matrices=False
when calling npl.svd()
(see https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.svd.html)
Metadata
Metadata
Assignees
Labels
No labels