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

Fails PseudoInvert for a specific simple matrix #1087

Open
ibasin opened this issue Aug 10, 2024 · 1 comment
Open

Fails PseudoInvert for a specific simple matrix #1087

ibasin opened this issue Aug 10, 2024 · 1 comment

Comments

@ibasin
Copy link

ibasin commented Aug 10, 2024

The following code will fail:

var m = M.DenseOfArray(new[,]
{
{ -2f, -2f, -1f },
{ -2f, 2f, 1f },
{ -1f, -1f, 2f },

});
var pinvM = m.PseudoInverse();
Console.WriteLine(pinvM);

@ibasin
Copy link
Author

ibasin commented Aug 11, 2024

If in method: MathNet.Numerics.Providers.LinearAlgebra.ManagedLinearAlgebraProvider.SingularValueDecomposition(bool computeVectors, float[] a, int rowsA, int columnsA, float[] s, float[] u, float[] vt)
you change
double ztest;
double test;
to
float ztest;
float test;
it will fix the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant