Use detLU to check that the input matrix is not singular before attempting to calculate the inverse.
Would close #38, though in a clumsy fashion.
Right now the inverse function (or rather, internal rref) has a ton of error checking. I feel like there should be two paths to calculate the inverse; a safe, guarded one that accepts it might be more expensive to run (in which case might as well use the Caley-Hamilton method) and an unsafe, express, assume-you-know-what-you're-doing, maybe
Use
detLU
to check that the input matrix is not singular before attempting to calculate the inverse.Would close #38, though in a clumsy fashion.
Right now the
inverse
function (or rather, internalrref
) has a ton of error checking. I feel like there should be two paths to calculate the inverse; a safe, guarded one that accepts it might be more expensive to run (in which case might as well use the Caley-Hamilton method) and an unsafe, express, assume-you-know-what-you're-doing, maybeanyway, patch attached
AfC