[Numpy-discussion] Question on LinAlg Inverse Algorithm
Mark Janikas
mjanikas@esri....
Tue Aug 30 19:38:59 CDT 2011
OK... so I have been using checksums to compare and it looks like I am getting a different value when it fails as opposed to when it passes... I.e. the input is NOT the same. When I save them to npy files and run LA.inv() I get consistent results. Now I have to track down in my code why the inputs are different.... Sucks, because I keep having to dive deeper (more checksums... yeh!). But it is all linear algebra from the same input, so kinda weird that there is a diversion. Thanks for all of your help! And Ill post again when I find the culprit. (probably me :-))
MJ
-----Original Message-----
From: numpy-discussion-bounces@scipy.org [mailto:numpy-discussion-bounces@scipy.org] On Behalf Of Robert Kern
Sent: Tuesday, August 30, 2011 4:42 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm
On Tue, Aug 30, 2011 at 17:48, Mark Janikas <mjanikas@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
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
More information about the NumPy-Discussion
mailing list