[SciPy-Dev] Proposal to merge linalg.pinv and linalg.pinv2 and deprecate pinv2

Ralf Gommers ralf.gommers at gmail.com
Sun Mar 21 17:59:19 EDT 2021


On Sun, Mar 21, 2021 at 8:21 PM Ilhan Polat <ilhanpolat at gmail.com> wrote:

> Currently, scipy has pinv, pinv2, pinvh pseudo inverse functions.
>
> The first one sends the array to the least squares solver to solve
>
> <rectangular matrix> @ X = Identity
>
> with minimum-norm solution
>
> And the other two forms the SVD based construction by inverting the SV/eig
> diagonal and reforming the product in the reverse order i.e. the typical
> pseudoinverse.
>
> However, the first one already does this in the lower level driver anyways
> since that's what gelss driver does [1]. Hence I think it is better to
> merge these and get rid of one as an alias in the deprecation cycle.
>

Sounds fine to me, having multiple and it not being clear to the user which
one to use is not great.

Do you happen to know the history of how we ended up with pinv2?

Cheers,
Ralf



> Thoughts?
>
> ilhan
>
>
> [1] https://www.netlib.org/lapack/lug/node27.html
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scipy-dev/attachments/20210321/1cd01b67/attachment.html>


More information about the SciPy-Dev mailing list