Skip to content

Conversation

@stevengj
Copy link
Member

@stevengj stevengj commented Oct 24, 2018

The pinv documentation falsely implied that it discarded singular values σ ≤ tol, when in fact it discards σ ≤ tol max(σ). This PR corrects the docstring.

(σ ≤ tol max(σ) is a good criterion! tol should be a dimensionless quantity that doesn't depend on the overall scaling/units of the matrix. I was relieved when I checked the source code and verified that tol was dimensionless.)

The `pinv` documentation falsely implied that it discarded singular values `σ > tol`, when in fact it discards `σ > tol max(σ)`.  This PR corrects the docstring.

(`σ > tol max(σ)` is a good behavior!  `tol` should be a dimensionless quantity that doesn't depend on the overall scaling/units of the matrix.)
@stevengj stevengj added docs This change adds or pertains to documentation linear algebra Linear algebra labels Oct 24, 2018
@stevengj stevengj requested a review from andreasnoack October 24, 2018 14:16
@simonbyrne
Copy link
Member

simonbyrne commented Oct 24, 2018

Let's also rename it to rtol to emphasise this: since it's currently a positional argument, it won't be breaking, but it would make it clearer.

Though probably not in this PR, we may want to make it a keyword arg (to keep it consistent with isapprox).

@stevengj stevengj merged commit 2996521 into master Oct 25, 2018
@stevengj stevengj deleted the stevengj-patch-3 branch October 25, 2018 12:28
KristofferC pushed a commit that referenced this pull request Oct 29, 2018
* clarify pinv documentation

The `pinv` documentation falsely implied that it discarded singular values `σ > tol`, when in fact it discards `σ > tol max(σ)`.  This PR corrects the docstring.

(`σ > tol max(σ)` is a good behavior!  `tol` should be a dimensionless quantity that doesn't depend on the overall scaling/units of the matrix.)

* rename tol -> rtol

(cherry picked from commit 2996521)
KristofferC pushed a commit that referenced this pull request Feb 11, 2019
* clarify pinv documentation

The `pinv` documentation falsely implied that it discarded singular values `σ > tol`, when in fact it discards `σ > tol max(σ)`.  This PR corrects the docstring.

(`σ > tol max(σ)` is a good behavior!  `tol` should be a dimensionless quantity that doesn't depend on the overall scaling/units of the matrix.)

* rename tol -> rtol

(cherry picked from commit 2996521)
KristofferC pushed a commit that referenced this pull request Feb 20, 2020
* clarify pinv documentation

The `pinv` documentation falsely implied that it discarded singular values `σ > tol`, when in fact it discards `σ > tol max(σ)`.  This PR corrects the docstring.

(`σ > tol max(σ)` is a good behavior!  `tol` should be a dimensionless quantity that doesn't depend on the overall scaling/units of the matrix.)

* rename tol -> rtol

(cherry picked from commit 2996521)
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.

6 participants