You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The wrong result is obtained when calculating the inverse matrix.
To Reproduce
Steps to reproduce the behavior:
Let m be a 2*2 specific matrix: nc::NdArray<int> m = { {0, 1}, {2, 3} };
Let n be the inverse matrix of m: auto n = nc::linalg::inv(m);
Output the matrix n: std::cout << n << std::endl;
See error
Expected behavior
The correct answer of n should be: [ [-1.5, 0.5], [1, 0] ]
Screenshots
The cause of the problem should be here: where t=0 (the first element in the matrix m)
Additional context
Test platform: Microsoft Visual Studio Community 2022 (x64) 17.0.5 Debug x64
defined the macro "NUMCPP_NO_USE_BOOST" at the very beginning. This problem does not recur in NumPy.
The text was updated successfully, but these errors were encountered:
Describe the bug
The wrong result is obtained when calculating the inverse matrix.
To Reproduce
Steps to reproduce the behavior:
nc::NdArray<int> m = { {0, 1}, {2, 3} };
auto n = nc::linalg::inv(m);
std::cout << n << std::endl;
Expected behavior
The correct answer of n should be:
[ [-1.5, 0.5], [1, 0] ]
Screenshots
The cause of the problem should be here:
where t=0 (the first element in the matrix m)
Additional context
Test platform: Microsoft Visual Studio Community 2022 (x64) 17.0.5 Debug x64
defined the macro "NUMCPP_NO_USE_BOOST" at the very beginning.
This problem does not recur in NumPy.
The text was updated successfully, but these errors were encountered: