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

svd: mismatch between docstring and return value #321

Open
mars0i opened this issue Aug 6, 2017 · 2 comments
Open

svd: mismatch between docstring and return value #321

mars0i opened this issue Aug 6, 2017 · 2 comments
Labels

Comments

@mars0i
Copy link

mars0i commented Aug 6, 2017

The docstring for svd says that the value of key :S is "a diagonal matrix whose elements are the singular values of the original matrix", but what's returned is a vector, apparently containing the singular values. This is true for vectorz, which returns a vectorz vector, and for clatrix, which returns a clojure.lang.ArraySeq$ArraySeq_double.

My guess is that it's the docstring that should be changed, rather than the function; I have the impression that folks often want only the singular values (although for calculating a Moore-Penrose inverse, it's the matrix that you need, though it's just as efficient or more to construct from scratch).

@mikera
Copy link
Owner

mikera commented Aug 11, 2017

Good catch. Yes I think it is best if we just change the docstring. Not much value in constructing a full diagonal matrix if you only need the singular values.

@mikera mikera added the bug label Aug 11, 2017
@mars0i
Copy link
Author

mars0i commented Aug 15, 2017

Submitted a PR. There's an error from VersionEye "Some dependencies have no license." Looks like this has something to do with hiccup. I don't know anything about this, but please let me know if it would be helpful for me to resubmit. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants