[Numpy-discussion] Question on LinAlg Inverse Algorithm

Robert Kern robert.kern at gmail.com
Tue Aug 30 19:42:26 EDT 2011


On Tue, Aug 30, 2011 at 17:48, Mark Janikas <mjanikas at esri.com> wrote:
> Hello All,
>
> Last week I posted a question involving the identification of linear
> dependent columns of a matrix… but now I am finding an interesting result
> based on the linalg.inv() function… sometime I am able to invert a matrix
> that has linear dependent columns and other times I get the LinAlgError()…
> this suggests that there is some kind of random component to the INV
> method.  Is this normal?  Thanks much ahead of time,

We will also need to know the platform that you are on as well as the
LAPACK library that you linked numpy against. It is the behavior of
that LAPACK library that is controlling here. Standard LAPACK does
sometimes use pseudorandom numbers in certain situations, but AFAICT
it deterministically seeds the PRNG on every call, and I don't think
it does this for any subroutine involved with inversion. But if you
use an optimized LAPACK from some vendor, I don't know what they may
be doing. Some optimized LAPACK/BLAS libraries may be threaded and may
dynamically determine how to break up the problem based on load (I
don't know of any that specifically do this, but it's a possibility).

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the NumPy-Discussion mailing list