Skip to content
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

Merged
merged 5 commits into from Sep 6, 2017
Merged

Implement cupy.linalg.pinv #459

merged 5 commits into from Sep 6, 2017

Conversation

rezoo
Copy link
Contributor

@rezoo rezoo commented Aug 30, 2017

This PR implements cupy.linalg.pinv.

@rezoo rezoo requested a review from niboshi August 30, 2017 09:31
@rezoo
Copy link
Contributor Author

rezoo commented Aug 30, 2017

Ah I assigned @niboshi as a reviewer by mistake. Please ignore that.

@okuta okuta added the cat:feature New features/APIs label Sep 5, 2017
Copy link
Member

@okuta okuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except comment

cutoff = rcond * s.max()
s1 = 1 / s
s1[s <= cutoff] = 0
return core.dot(vt.transpose(), s1[:, None] * u.transpose())
Copy link
Member

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) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@okuta okuta self-assigned this Sep 5, 2017
@okuta okuta added st:test-and-merge (deprecated) Ready to merge after test pass. and removed st:test-and-merge (deprecated) Ready to merge after test pass. labels Sep 5, 2017
@okuta okuta added this to the v2.0.0rc1 milestone Sep 6, 2017
@okuta
Copy link
Member

okuta commented Sep 6, 2017

LGTM!

@okuta okuta merged commit 0ff9242 into cupy:master Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:feature New features/APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants