New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement cupy.linalg.pinv #459
Conversation
Ah I assigned @niboshi as a reviewer by mistake. Please ignore that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except comment
cupy/linalg/solve.py
Outdated
cutoff = rcond * s.max() | ||
s1 = 1 / s | ||
s1[s <= cutoff] = 0 | ||
return core.dot(vt.transpose(), s1[:, None] * u.transpose()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about return core.dot(vt.T, s1[:, None] * u.T)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
LGTM! |
This PR implements
cupy.linalg.pinv
.