[Bug]: formula for `pinv` is transpose of the pseudoinverse
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- documentation
Research direction
Open the linked pinv documentation and review the displayed pseudoinverse formula and the descriptions of Σ+, U, and V^H. Correct the formula, clarify the definition of Σ+, and use “unitary” where appropriate for the complex case. Done means the documented equations and terminology accurately describe the pseudoinverse.
Written by the indexing model from the issue text.
Description
The documentation of pinv shows:
$$
A^+ = U \Sigma^+ V^H
$$
but it should be:
$$
A^+ = V \Sigma^+ U^H
$$
It describes:
...and $\Sigma^+$ is then a diagonal matrix consisting of the reciprocals of $A$’s singular values, leaving zeros in place.
but it should probably me more like:
...and $\Sigma^+$ is then the transpose of $\Sigma$ with nonzero diagonal entries replaced by their reciprocals.
When checking this, GPT-5.6 also noticed that $U$ abd $V^H$ are described as "orthogonal", but "unitary" would be more correct in the complex case.
- Dominant language
- Python
- Stars
- 281
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from data-apis/array-api
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Maintenance
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
All issues in data-apis/array-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100