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

Update svd.jl #30239

Merged
merged 9 commits into from
Jan 7, 2020
Merged

Update svd.jl #30239

merged 9 commits into from
Jan 7, 2020

Conversation

alanedelman
Copy link
Contributor

No description provided.

Copy link
Contributor

@kshyatt kshyatt left a comment

Choose a reason for hiding this comment

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

Did you run these doctests locally? I'm pretty sure you wanted A == ... here...

@KristofferC
Copy link
Member

I think this works fine? Note that it is (isapprox) and not =. However, there should be spaces between the inputs like

julia> A = rand(4,3);

julia> U,S,V = svd(A);

julia> A ≈ U*Diagonal(S)*V'
true

@kshyatt
Copy link
Contributor

kshyatt commented Dec 3, 2018 via email

@kshyatt kshyatt added docs This change adds or pertains to documentation linear algebra Linear algebra labels Dec 4, 2018
@simonbyrne
Copy link
Contributor

Welcome @alanedelman, I see that this is your first pull request to Julia!

Would it be better to combine this example with the one below it?

@ViralBShah
Copy link
Member

Tests failing with trailing whitespaces.

@andreasnoack
Copy link
Member

I've fixed the doctests so they are now passing (the failure on Mac is unrelated). @alanedelman I've reorganized the paragraphs in the generalized svd documentation. The docstrings usually starts with a fairly compact description of inputs and outputs and then gives more details in the following. Please take a look.

I've also deleted the examples in the docstrings of the mutating versions and instead made references to the documentation of the non-mutating versions. This should make it easier to maintain the documentation.

@alanedelman alanedelman closed this Mar 3, 2019
@andreasnoack andreasnoack reopened this Jan 7, 2020
@andreasnoack andreasnoack merged commit cec4c32 into JuliaLang:master Jan 7, 2020
KristofferC pushed a commit that referenced this pull request Jan 8, 2020
* Update svd.jl

* Update svd.jl

Make doc more useful to the reader.

* Fix grammar and one trailing whitespace

* Update svd.jl

* Fix doctests

* Avoid duplicating documentation between mutating and non-mutating
versions of svd functions.

* Reorganize generalized svd docstring and doctests

* Break some long lines

Co-authored-by: Viral B. Shah <viral@juliacomputing.com>
Co-authored-by: Andreas Noack <andreas@noack.dk>
(cherry picked from commit cec4c32)
@KristofferC KristofferC mentioned this pull request Jan 8, 2020
28 tasks
KristofferC pushed a commit that referenced this pull request Apr 11, 2020
* Update svd.jl

* Update svd.jl

Make doc more useful to the reader.

* Fix grammar and one trailing whitespace

* Update svd.jl

* Fix doctests

* Avoid duplicating documentation between mutating and non-mutating
versions of svd functions.

* Reorganize generalized svd docstring and doctests

* Break some long lines

Co-authored-by: Viral B. Shah <viral@juliacomputing.com>
Co-authored-by: Andreas Noack <andreas@noack.dk>
BioTurboNick pushed a commit to BioTurboNick/julia that referenced this pull request Apr 13, 2020
* Update svd.jl

* Update svd.jl

Make doc more useful to the reader.

* Fix grammar and one trailing whitespace

* Update svd.jl

* Fix doctests

* Avoid duplicating documentation between mutating and non-mutating
versions of svd functions.

* Reorganize generalized svd docstring and doctests

* Break some long lines

Co-authored-by: Viral B. Shah <viral@juliacomputing.com>
Co-authored-by: Andreas Noack <andreas@noack.dk>
(cherry picked from commit cec4c32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants