josdejong / josdejong/mathjs

Bug in function `pinv`

Open
#3,012 3 comments 0 reactions 0 assignees View on GitHub
Needs more information
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/josdejong/mathjs/blob/49c793ba5a47359157a2c5009e63b11e43fcff2e/src/function/matrix/pinv.js#L120

Hiya!

I was using this in my codebase, and I found that it was the source of an issue. I ended up switching to the ml-matrix implementation of pseudoinverse, which seemed to fix my problem! I see that there's a comment suggesting this be reimplemented with SVD to improve precision - it may have been that. I can't unfortunately share the code which had the issue, but I thought I'd leave a comment all the same.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.