numo-linalg
numo-linalg copied to clipboard
inv of singular matrix returns some matrix without error
I tried this script.
require "numo/linalg"
a = Numo::DFloat[[0, 0],
[0, 0]]
p(Numo::Linalg.inv(a))
Result is here.
Numo::DFloat#shape=[2,2]
[[0, 0],
[0, 0]]
I think that a matrix with all zero elements has no inverse matrix.