Re: [Numpy-discussion] svd error checking vs. speed

2014-02-20 Thread alex
On Mon, Feb 17, 2014 at 1:24 PM, Sturla Molden wrote: > Sturla Molden wrote: >> Dave Hirschfeld wrote: >> >>> Even if lapack_lite always performed the isfinite check and threw a python >>> error if False, it would be much better than either hanging or segfaulting >>> and >>> people who care about

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Sturla Molden
Sturla Molden wrote: > wrote: > maybe -1 >> >> statsmodels is using np.linalg.pinv which uses svd >> I never ran heard of any crash (*), and the only time I compared with >> scipy I didn't like the slowdown. > > If you did care about speed in least-sqares fitting you would not call QR > or SVD

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Sturla Molden
wrote: maybe -1 > > statsmodels is using np.linalg.pinv which uses svd > I never ran heard of any crash (*), and the only time I compared with > scipy I didn't like the slowdown. If you did care about speed in least-sqares fitting you would not call QR or SVD directly, but use the builting LAPA

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Sturla Molden
Sturla Molden wrote: > Dave Hirschfeld wrote: > >> Even if lapack_lite always performed the isfinite check and threw a python >> error if False, it would be much better than either hanging or segfaulting >> and >> people who care about the isfinite cost probably would be linking to a fast >>

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Sturla Molden
Dave Hirschfeld wrote: > Even if lapack_lite always performed the isfinite check and threw a python > error if False, it would be much better than either hanging or segfaulting > and > people who care about the isfinite cost probably would be linking to a fast > lapack anyway. +1 (if I have

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Dave Hirschfeld
Sturla Molden gmail.com> writes: > > gmail.com> wrote: > > > I use official numpy release for development, Windows, 32bit python, > > i.e. MingW 3.5 and whatever old ATLAS the release includes. > > > > a constant 13% cpu usage is 1/8 th of my 8 virtual cores. > > Based on this and Alex' mess

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Sturla Molden
wrote: > I use official numpy release for development, Windows, 32bit python, > i.e. MingW 3.5 and whatever old ATLAS the release includes. > > a constant 13% cpu usage is 1/8 th of my 8 virtual cores. Based on this and Alex' message it seems the offender is the f2c generated lapack_lite librar

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread josef . pktd
On Mon, Feb 17, 2014 at 10:03 AM, alex wrote: > On Mon, Feb 17, 2014 at 4:49 AM, Dave Hirschfeld wrote: >> alex ncsu.edu> writes: >> >>> >>> Hello list, >>> >>> Here's another idea resurrection from numpy github comments that I've >>> been advised could be posted here for re-discussion. >>> >>>

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread alex
On Mon, Feb 17, 2014 at 4:49 AM, Dave Hirschfeld wrote: > alex ncsu.edu> writes: > >> >> Hello list, >> >> Here's another idea resurrection from numpy github comments that I've >> been advised could be posted here for re-discussion. >> >> The proposal would be to make np.linalg.svd more like scip

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Sturla Molden
Jason Grout wrote: > For what my vote is worth, -1. I thought this was pretty much the > designed difference between the scipy and numpy linalg routines. Scipy > does the checking, and numpy provides the raw speed. Maybe this is > better resolved as a note in the documentation for numpy ab

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Sturla Molden
Dave Hirschfeld wrote: > It certainly shouldn't crash or hang though and for me at least it doesn't - > it returns NaN which immediately suggests to me that I've got bad input > (maybe just because I've seen it before). It might be dependent on the BLAS or LAPACK version. Since you are on Anac

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Jason Grout
On 2/15/14 3:37 PM, alex wrote: > The proposal would be to make np.linalg.svd more like scipy.linalg.svd > with respect to input checking. The argument against the change is > raw speed; if you know that you will never feed non-finite input to > svd, then np.linalg.svd is a bit faster than scipy.l

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-17 Thread Dave Hirschfeld
alex ncsu.edu> writes: > > Hello list, > > Here's another idea resurrection from numpy github comments that I've > been advised could be posted here for re-discussion. > > The proposal would be to make np.linalg.svd more like scipy.linalg.svd > with respect to input checking. The argument aga

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread alex
On Sat, Feb 15, 2014 at 6:34 PM, Sebastian Berg wrote: > On Sa, 2014-02-15 at 18:20 -0500, alex wrote: > >> >> I'm not sure exactly what you mean by this. You are suggesting that >> if the svd fails with some kind of exception (possibly poorly or >> misleadingly worded) then it could be cleaned-

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread Sebastian Berg
On Sa, 2014-02-15 at 18:20 -0500, alex wrote: > > I'm not sure exactly what you mean by this. You are suggesting that > if the svd fails with some kind of exception (possibly poorly or > misleadingly worded) then it could be cleaned-up after the fact by > checking the input, and that this would

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread alex
On Sat, Feb 15, 2014 at 6:06 PM, Sebastian Berg wrote: > On Sa, 2014-02-15 at 17:35 -0500, josef.p...@gmail.com wrote: >> On Sat, Feb 15, 2014 at 5:12 PM, Skipper Seabold wrote: >> > On Sat, Feb 15, 2014 at 5:08 PM, wrote: >> >> >> >> On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg >> >> wrote:

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread Sturla Molden
wrote: > copy of np.pinv used in linear regression > https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tools/tools.py#L348 > (it's a recent change to streamline some of the linalg in regression, > and master only) Why not call lapack routine DGELSS instead? It does exactly this,

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread Sebastian Berg
On Sa, 2014-02-15 at 17:35 -0500, josef.p...@gmail.com wrote: > On Sat, Feb 15, 2014 at 5:12 PM, Skipper Seabold wrote: > > On Sat, Feb 15, 2014 at 5:08 PM, wrote: > >> > >> On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg > >> wrote: > >> > On Sa, 2014-02-15 at 16:37 -0500, alex wrote: > >> >> H

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread josef . pktd
On Sat, Feb 15, 2014 at 5:18 PM, alex wrote: > On Sat, Feb 15, 2014 at 5:08 PM, wrote: >> On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg >> wrote: >>> On Sa, 2014-02-15 at 16:37 -0500, alex wrote: Hello list, Here's another idea resurrection from numpy github comments that I've

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread alex
On Sat, Feb 15, 2014 at 5:08 PM, wrote: > On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg > wrote: >> On Sa, 2014-02-15 at 16:37 -0500, alex wrote: >>> Hello list, >>> >>> Here's another idea resurrection from numpy github comments that I've >>> been advised could be posted here for re-discussio

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread josef . pktd
On Sat, Feb 15, 2014 at 5:12 PM, Skipper Seabold wrote: > On Sat, Feb 15, 2014 at 5:08 PM, wrote: >> >> On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg >> wrote: >> > On Sa, 2014-02-15 at 16:37 -0500, alex wrote: >> >> Hello list, >> >> >> >> Here's another idea resurrection from numpy github co

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread alex
On Sat, Feb 15, 2014 at 5:08 PM, wrote: > On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg > wrote: >> On Sa, 2014-02-15 at 16:37 -0500, alex wrote: >>> Hello list, >>> >>> Here's another idea resurrection from numpy github comments that I've >>> been advised could be posted here for re-discussio

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread Skipper Seabold
On Sat, Feb 15, 2014 at 5:08 PM, wrote: > On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg > wrote: > > On Sa, 2014-02-15 at 16:37 -0500, alex wrote: > >> Hello list, > >> > >> Here's another idea resurrection from numpy github comments that I've > >> been advised could be posted here for re-disc

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread josef . pktd
On Sat, Feb 15, 2014 at 4:56 PM, Sebastian Berg wrote: > On Sa, 2014-02-15 at 16:37 -0500, alex wrote: >> Hello list, >> >> Here's another idea resurrection from numpy github comments that I've >> been advised could be posted here for re-discussion. >> >> The proposal would be to make np.linalg.sv

Re: [Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread Sebastian Berg
On Sa, 2014-02-15 at 16:37 -0500, alex wrote: > Hello list, > > Here's another idea resurrection from numpy github comments that I've > been advised could be posted here for re-discussion. > > The proposal would be to make np.linalg.svd more like scipy.linalg.svd > with respect to input checking.

[Numpy-discussion] svd error checking vs. speed

2014-02-15 Thread alex
Hello list, Here's another idea resurrection from numpy github comments that I've been advised could be posted here for re-discussion. The proposal would be to make np.linalg.svd more like scipy.linalg.svd with respect to input checking. The argument against the change is raw speed; if you know

Re: [Numpy-discussion] svd + multiprocessing hangs

2013-06-13 Thread Uwe Schmitt
Am 12.06.2013 19:27, schrieb Julian Taylor: > I'm guessing you are using openblas? > check with: > ls -l /etc/alternatives/libblas.so.3 > > there are known hanging problems with openblas and multiprocessing. > you can work around them by disabling threading in openblas > (OPENBLAS_NUM_THREADS=1).

Re: [Numpy-discussion] svd + multiprocessing hangs

2013-06-12 Thread Alexander Eberspächer
On 06/12/2013 07:27 PM, Julian Taylor wrote: > I'm guessing you are using openblas? I can confirm hanging with OpenBLAS using OpenMP. > there are known hanging problems with openblas and multiprocessing. > you can work around them by disabling threading in openblas > (OPENBLAS_NUM_THREADS=1). T

Re: [Numpy-discussion] svd + multiprocessing hangs

2013-06-12 Thread Julian Taylor
On 12.06.2013 18:07, Uwe Schmitt wrote: > Dear all, > > the following code hangs on my Ubuntu machine. > I use self compiled numpy 1.7.1 and Python > 2.7.3 > > - > > import numpy > import numpy.linalg > import multiprocessing > > def classify(): > X = numpy.random.random((10,3)) > p

Re: [Numpy-discussion] svd + multiprocessing hangs

2013-06-12 Thread Bradley M. Froehle
Dear Uwe: I can't reproduce this using the system default versions of Python and NumPy on Ubuntu 13.04: $ python uwe.py before svd this message is not printed >>> sys.version_info sys.version_info(major=2, minor=7, micro=4, releaselevel='final', serial=0) >>> numpy.__version__ '1.7.1' Any idea

[Numpy-discussion] svd + multiprocessing hangs

2013-06-12 Thread Uwe Schmitt
Dear all, the following code hangs on my Ubuntu machine. I use self compiled numpy 1.7.1 and Python 2.7.3 - import numpy import numpy.linalg import multiprocessing def classify(): X = numpy.random.random((10,3)) print "before svd" numpy.linalg.svd(X) print "this message is n

Re: [Numpy-discussion] SVD errors

2013-06-04 Thread Robert Kern
On Tue, Jun 4, 2013 at 5:18 PM, Amir Mohammadi <183.a...@gmail.com> wrote: > Hello Everyone, > > I am trying to write my own svd function to use the "dgesvd" method from > lapack, but my problem is that I cannot find the "dgesvd" method from this > import "from numpy.linalg import lapack_lite". >

Re: [Numpy-discussion] SVD errors

2013-06-04 Thread Amir Mohammadi
Robert Kern gmail.com> writes: > > On Mon, Feb 9, 2009 at 16:25, M Trumpis berkeley.edu> wrote: > > I played around with a C translation of that test program, and found > > that dgesvd (but not dgesdd) happens to converge and return all > > non-negative singular values for both operators I was

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-20 Thread Gael Varoquaux
On Sun, Aug 14, 2011 at 09:15:35PM +0200, Charanpal Dhanjal wrote: > Incidentally, I am confused as to why numpy calls the lapack lite > routines - when I call numpy.show_config() it seems to have detected my > ATLAS libraries and I would have expected it to use those. My rule of thumb is to nev

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-14 Thread Charanpal Dhanjal
Thanks very much Lou for the information. I tried delving into the C code and found a line in the dlasd4_ routine which reads: for (niter = iter; niter <= MAXITERLOOPS; ++niter) { This is apparently the main loop for this subroutine and the value of MAXITERLOOPS = 100. All I did was increase th

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-14 Thread Lou Pecora
Chuck wrote: Fails here also, fedora 15 64 bits AMD 940. There should be a maximum iterations argument somewhere... Chuck ---    ***  Here's the "FIX": Chuck is right.  There is a max iterations.  Here is a re

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-14 Thread Charanpal Dhanjal
I had a quick look at the code (https://github.com/numpy/numpy/blob/master/numpy/linalg/linalg.py) and the numpy.linalg.svd function calls lapack_lite.dgesdd (for real matrices) so I guess the non-convergence occurs in this function. As I understood lapack_lite is used by default unless numpy i

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-13 Thread Charles R Harris
On Thu, Aug 11, 2011 at 7:23 AM, wrote: > Hi all, > > I get an error message "numpy.linalg.linalg.LinAlgError: SVD did not > converge" when calling numpy.linalg.svd on a "clean" matrix of size (1952, > 895). The matrix is clean in the sense that it contains no NaN or Inf > values. The correspondi

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-12 Thread Nadav Horesh
: 12 August 2011 16:33 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] SVD does not converge on "clean" matrix On Fri, Aug 12, 2011 at 4:03 AM, Charanpal Dhanjal mailto:dhan...@telecom-paristech.fr>> wrote: Thank Nadav for testing out the matrix. I wonder if you

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-12 Thread Warren Weckesser
Aug 2011 07:21:09 -0700 > From: Nadav Horesh > Subject: Re: [Numpy-discussion] SVD does not converge on "clean" > matrix > To: Discussion of Numerical Python > Message-ID: > > <26FC23E7C398A64083C980D16001012D246DFC5F90@VA3DIAXVS361.RED001.local> > Conte

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-12 Thread Charanpal Dhanjal
umpy 1.5.1 (without ATLAS), and so the reasons for the differences seem to be OS or processor dependent. Any ideas? Charanpal Date: Thu, 11 Aug 2011 07:21:09 -0700 From: Nadav Horesh Subject: Re: [Numpy-discussion] SVD does not converge on "clean" matrix To: Discussion of Numerica

Re: [Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-11 Thread Nadav Horesh
...@telecom-paristech.fr] Sent: 11 August 2011 16:23 To: numpy-discussion@scipy.org Subject: [Numpy-discussion] SVD does not converge on "clean" matrix Hi all, I get an error message "numpy.linalg.linalg.LinAlgError: SVD did not converge" when calling numpy.linalg.svd on a "cl

[Numpy-discussion] SVD does not converge on "clean" matrix

2011-08-11 Thread dhanjal
Hi all, I get an error message "numpy.linalg.linalg.LinAlgError: SVD did not converge" when calling numpy.linalg.svd on a "clean" matrix of size (1952, 895). The matrix is clean in the sense that it contains no NaN or Inf values. The corresponding npz file is available here: https://docs.google.co

Re: [Numpy-discussion] SVD does not converge

2011-06-28 Thread santhu kumar
Pecora) > > > ------ > > Message: 1 > Date: Tue, 28 Jun 2011 10:56:48 -0500 > From: santhu kumar > Subject: [Numpy-discussion] SVD does not converge > To: numpy-discussion@scipy.org > Message-ID: > Co

Re: [Numpy-discussion] SVD does not converge

2011-06-28 Thread Charles R Harris
On Tue, Jun 28, 2011 at 11:36 AM, eat wrote: > Hi, > > On Tue, Jun 28, 2011 at 7:43 PM, Lou Pecora wrote: > >> >> -- >> *From:* santhu kumar >> *To:* numpy-discussion@scipy.org >> *Sent:* Tue, June 28, 2011 11:56:48 AM >

Re: [Numpy-discussion] SVD does not converge

2011-06-28 Thread eat
Hi, On Tue, Jun 28, 2011 at 7:43 PM, Lou Pecora wrote: > > -- > *From:* santhu kumar > *To:* numpy-discussion@scipy.org > *Sent:* Tue, June 28, 2011 11:56:48 AM > *Subject:* [Numpy-discussion] SVD does not converge > > Hello, > > I hav

Re: [Numpy-discussion] SVD does not converge

2011-06-28 Thread Lou Pecora
From: santhu kumar To: numpy-discussion@scipy.org Sent: Tue, June 28, 2011 11:56:48 AM Subject: [Numpy-discussion] SVD does not converge Hello, I have a 380X5 matrix and when I am calculating pseudo-inverse of the matrix using pinv(numpy.linalg) I get the

Re: [Numpy-discussion] SVD does not converge

2011-06-28 Thread Sebastian Berg
Hi, On Tue, 2011-06-28 at 10:56 -0500, santhu kumar wrote: > Hello, > > I have a 380X5 matrix and when I am calculating pseudo-inverse of the > matrix using pinv(numpy.linalg) I get the following error message: > > raise LinAlgError, 'SVD did not converge' > numpy.linalg.linalg.LinAlgError: SVD

Re: [Numpy-discussion] SVD does not converge

2011-06-28 Thread Charles R Harris
On Tue, Jun 28, 2011 at 9:56 AM, santhu kumar wrote: > Hello, > > I have a 380X5 matrix and when I am calculating pseudo-inverse of the > matrix using pinv(numpy.linalg) I get the following error message: > > raise LinAlgError, 'SVD did not converge' > numpy.linalg.linalg.LinAlgError: SVD did not

[Numpy-discussion] SVD does not converge

2011-06-28 Thread santhu kumar
Hello, I have a 380X5 matrix and when I am calculating pseudo-inverse of the matrix using pinv(numpy.linalg) I get the following error message: raise LinAlgError, 'SVD did not converge' numpy.linalg.linalg.LinAlgError: SVD did not converge I have looked in the list that it is a recurring issue b

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-24 Thread Daniel Wagner
On Oct 24, 2010, at 4:29 AM, josef.p...@gmail.com wrote: > On Sat, Oct 23, 2010 at 11:47 PM, Daniel Wagner > wrote: >> >> On Oct 23, 2010, at 11:25 PM, Charles R Harris wrote: >> >> >> On Sat, Oct 23, 2010 at 9:21 PM, Daniel Wagner >> wrote: >>> >>> On Oct 23, 2010, at 10:48 PM, Charles R H

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-24 Thread josef . pktd
On Sat, Oct 23, 2010 at 11:47 PM, Daniel Wagner wrote: > > On Oct 23, 2010, at 11:25 PM, Charles R Harris wrote: > > > On Sat, Oct 23, 2010 at 9:21 PM, Daniel Wagner > wrote: >> >> On Oct 23, 2010, at 10:48 PM, Charles R Harris wrote: >> >> >> On Sat, Oct 23, 2010 at 8:33 PM, Daniel Wagner >> wr

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-23 Thread Daniel Wagner
On Oct 23, 2010, at 11:25 PM, Charles R Harris wrote: > > > On Sat, Oct 23, 2010 at 9:21 PM, Daniel Wagner > wrote: > > On Oct 23, 2010, at 10:48 PM, Charles R Harris wrote: > >> >> >> On Sat, Oct 23, 2010 at 8:33 PM, Daniel Wagner >> wrote: >>> On Sat, Oct 23, 2010 at 7:00 PM, Daniel W

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-23 Thread Daniel Wagner
On Oct 23, 2010, at 11:25 PM, Charles R Harris wrote: > > > On Sat, Oct 23, 2010 at 9:21 PM, Daniel Wagner > wrote: > > On Oct 23, 2010, at 10:48 PM, Charles R Harris wrote: > >> >> >> On Sat, Oct 23, 2010 at 8:33 PM, Daniel Wagner >> wrote: >>> On Sat, Oct 23, 2010 at 7:00 PM, Daniel W

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-23 Thread Charles R Harris
On Sat, Oct 23, 2010 at 9:21 PM, Daniel Wagner wrote: > > On Oct 23, 2010, at 10:48 PM, Charles R Harris wrote: > > > > On Sat, Oct 23, 2010 at 8:33 PM, Daniel Wagner googlemail.com> wrote: > >> On Sat, Oct 23, 2010 at 7:00 PM, Daniel Wagner > googlemail.com> wrote: >> >>> Hi, >>> >>> I'm a new

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-23 Thread Daniel Wagner
On Oct 23, 2010, at 10:48 PM, Charles R Harris wrote: > > > On Sat, Oct 23, 2010 at 8:33 PM, Daniel Wagner > wrote: >> On Sat, Oct 23, 2010 at 7:00 PM, Daniel Wagner >> wrote: >> Hi, >> >> I'm a new subscriber of this list. I hope to directly start with a question >> is ok... >> >> My qu

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-23 Thread Charles R Harris
On Sat, Oct 23, 2010 at 8:33 PM, Daniel Wagner wrote: > On Sat, Oct 23, 2010 at 7:00 PM, Daniel Wagner googlemail.com> wrote: > >> Hi, >> >> I'm a new subscriber of this list. I hope to directly start with a >> question is ok... >> >> My question or problem: >> I've a matrix A which is calculate

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-23 Thread Daniel Wagner
> On Sat, Oct 23, 2010 at 7:00 PM, Daniel Wagner > wrote: > Hi, > > I'm a new subscriber of this list. I hope to directly start with a question > is ok... > > My question or problem: > I've a matrix A which is calculated from the data b. The shapes of these > matrices are: > >>>A.shape > (954

Re: [Numpy-discussion] SVD problem - matrices are not aligned

2010-10-23 Thread Charles R Harris
On Sat, Oct 23, 2010 at 7:00 PM, Daniel Wagner wrote: > Hi, > > I'm a new subscriber of this list. I hope to directly start with a question > is ok... > > My question or problem: > I've a matrix A which is calculated from the data b. The shapes of these > matrices are: > >>>A.shape > (954, 9) > >

[Numpy-discussion] SVD problem - matrices are not aligned

2010-10-23 Thread Daniel Wagner
Hi, I'm a new subscriber of this list. I hope to directly start with a question is ok... My question or problem: I've a matrix A which is calculated from the data b. The shapes of these matrices are: >>>A.shape (954, 9) >>>b.shape (954,) I calculate the SVD of A: >>> U, w, V = numpy.linalg.svd

Re: [Numpy-discussion] SVD failure

2009-05-04 Thread Philipp K. Janert
Thanks for the quick reply. I'll try upgrading. Best, Ph. On Monday 04 May 2009 04:21:29 pm Stéfan van der Walt wrote: > Hi Philipp > > 2009/5/5 Philipp K. Janert : > > If I see this correctly, my SciPy version > > is 0.6.0; running on 64bit Suse 11. > > SciPy 0.6 is quite old

Re: [Numpy-discussion] SVD failure

2009-05-04 Thread Stéfan van der Walt
Hi Philipp 2009/5/5 Philipp K. Janert : > If I see this correctly, my SciPy version > is 0.6.0; running on 64bit Suse 11. SciPy 0.6 is quite old, and it is likely that the problem was fixed in the mean time. On SciPy 0.7 I see: In [31]: u,s,v = linalg.svd(m) In [32]: u Out[32]: array([[-0.7071

[Numpy-discussion] SVD failure

2009-05-04 Thread Philipp K. Janert
The following code: from scipy import * from scipy import linalg m = matrix( [ [1,1,0,0], [1,1,0,0], [0,0,1,1], [0,0,1,1] ] ) u,s,v = linalg.svd( m ) fails with the following message: Traceback (most recent call last): File "boo.py", li

Re: [Numpy-discussion] SVD errors

2009-02-09 Thread Robert Kern
On Mon, Feb 9, 2009 at 16:25, M Trumpis wrote: > I played around with a C translation of that test program, and found > that dgesvd (but not dgesdd) happens to converge and return all > non-negative singular values for both operators I was having trouble > with. I'm also looking at the Octave code

Re: [Numpy-discussion] SVD errors

2009-02-09 Thread M Trumpis
I played around with a C translation of that test program, and found that dgesvd (but not dgesdd) happens to converge and return all non-negative singular values for both operators I was having trouble with. I'm also looking at the Octave code just now, and I think they're using dgesvd also. Any on

Re: [Numpy-discussion] SVD errors

2009-02-03 Thread Pauli Virtanen
Mon, 02 Feb 2009 18:27:05 -0600, Robert Kern wrote: > On Mon, Feb 2, 2009 at 18:21, wrote: >> Hello list.. I've run into two SVD errors over the last few days. Both >> errors are identical in numpy/scipy. >> >> I've submitted a ticket for the 1st problem (numpy ticket #990). >> Summary is: some b

Re: [Numpy-discussion] SVD errors

2009-02-02 Thread Lou Pecora
du > Subject: [Numpy-discussion] SVD errors > To: numpy-discussion@scipy.org > Date: Monday, February 2, 2009, 7:21 PM > Hello list.. I've run into two SVD errors over the last > few days. Both > errors are identical in numpy/scipy. > > I've submitted a ticket for

Re: [Numpy-discussion] SVD errors

2009-02-02 Thread Robert Kern
On Mon, Feb 2, 2009 at 18:21, wrote: > Hello list.. I've run into two SVD errors over the last few days. Both > errors are identical in numpy/scipy. > > I've submitted a ticket for the 1st problem (numpy ticket #990). Summary > is: some builds of the lapack_lite module linking against system LAPA

[Numpy-discussion] SVD errors

2009-02-02 Thread mtrumpis
Hello list.. I've run into two SVD errors over the last few days. Both errors are identical in numpy/scipy. I've submitted a ticket for the 1st problem (numpy ticket #990). Summary is: some builds of the lapack_lite module linking against system LAPACK (not the bundled dlapack_lite.o, etc) give a

Re: [Numpy-discussion] svd

2008-07-16 Thread Charles Doutriaux
doh... Thanks Charles... I guess I've been staring at this code for too long now... C. Charles R Harris wrote: > > > On Wed, Jul 16, 2008 at 3:58 PM, Charles Doutriaux > <[EMAIL PROTECTED] > wrote: > > Hello, > > I'm using 1.1.0 and I have a bizarre thing happ

Re: [Numpy-discussion] svd

2008-07-16 Thread Charles R Harris
On Wed, Jul 16, 2008 at 3:58 PM, Charles Doutriaux <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using 1.1.0 and I have a bizarre thing happening > > it seems as if: > doing: > import numpy > SVD = numpy.linalg.svd > > if different as doing > import numpy.oldnumeric.linear_algebra > SVD = numpy.oldn

[Numpy-discussion] svd

2008-07-16 Thread Charles Doutriaux
Hello, I'm using 1.1.0 and I have a bizarre thing happening it seems as if: doing: import numpy SVD = numpy.linalg.svd if different as doing import numpy.oldnumeric.linear_algebra SVD = numpy.oldnumeric.linear_algebra.singular_value_decomposition In the first case passing an array (204,1484) re

Re: [Numpy-discussion] svd in numpy

2008-05-19 Thread David Cournapeau
Bruce Southey wrote: > Nripun Sredar wrote: > >> I am running on Windows Xp, Intel Xeon CPU. I'd like to fill in a few >> more things here. If I send 0 in the second and third argument of svd >> then I get the singular_values, but if its 1 then the problem >> persists. I've tried this on spar

Re: [Numpy-discussion] svd in numpy

2008-05-19 Thread Nripun Sredar
Thank You.. The problem is resolved On Mon, May 19, 2008 at 10:31 AM, Bruce Southey <[EMAIL PROTECTED]> wrote: > Nripun Sredar wrote: > > I am running on Windows Xp, Intel Xeon CPU. I'd like to fill in a few > > more things here. If I send 0 in the second and third argument of svd > > then I get

Re: [Numpy-discussion] svd in numpy

2008-05-19 Thread Bruce Southey
Nripun Sredar wrote: > I am running on Windows Xp, Intel Xeon CPU. I'd like to fill in a few > more things here. If I send 0 in the second and third argument of svd > then I get the singular_values, but if its 1 then the problem > persists. I've tried this on sparse and non-sparse matrices. This

Re: [Numpy-discussion] svd in numpy

2008-05-19 Thread Nripun Sredar
I am running on Windows Xp, Intel Xeon CPU. I'd like to fill in a few more things here. If I send 0 in the second and third argument of svd then I get the singular_values, but if its 1 then the problem persists. I've tried this on sparse and non-sparse matrices. This is with the latest windows bina

Re: [Numpy-discussion] svd in numpy

2008-05-18 Thread Zachary Pincus
On May 17, 2008, at 9:34 AM, David Cournapeau wrote: > Nripun Sredar wrote: >> I have a sparse matrix 416x52. I tried to factorize this matrix using >> svd from numpy. But it didn't produce a result and looked like it is >> in an infinite loop. >> I tried a similar operation using random numbers i

Re: [Numpy-discussion] svd in numpy

2008-05-17 Thread David Cournapeau
Nripun Sredar wrote: > I have a sparse matrix 416x52. I tried to factorize this matrix using > svd from numpy. But it didn't produce a result and looked like it is > in an infinite loop. > I tried a similar operation using random numbers in the matrix. Even > this is in an infinite loop. > Did a

Re: [Numpy-discussion] svd in numpy

2008-05-16 Thread Bruce Southey
Nripun Sredar wrote: > I have a sparse matrix 416x52. I tried to factorize this matrix using > svd from numpy. But it didn't produce a result and looked like it is > in an infinite loop. > I tried a similar operation using random numbers in the matrix. Even > this is in an infinite loop. > Did a

[Numpy-discussion] svd in numpy

2008-05-16 Thread Nripun Sredar
I have a sparse matrix 416x52. I tried to factorize this matrix using svd from numpy. But it didn't produce a result and looked like it is in an infinite loop. I tried a similar operation using random numbers in the matrix. Even this is in an infinite loop. Did anyone else face a similar problem? C

Re: [Numpy-discussion] svd and eigh

2008-05-03 Thread Matthieu Brucher
Hi, The opposite of an eigenvector is an eigenvector as well, with the same eigenvalue. Depending on the algorithm, both can be returned. Matthieu 2008/5/3 wilson <[EMAIL PROTECTED]>: > thanks for the links.. > but why the different signs for entries in eigenvectors? is it a > library specific

Re: [Numpy-discussion] svd and eigh

2008-05-03 Thread wilson
thanks for the links.. but why the different signs for entries in eigenvectors? is it a library specific thing? shouldn't they be identical? W ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-di

Re: [Numpy-discussion] svd and eigh

2008-05-02 Thread Nils Wagner
On Fri, 2 May 2008 23:34:19 -0700 (PDT) wilson <[EMAIL PROTECTED]> wrote: > I am trying out the eigenvectors related functions in >numpy.linalg.I > came across some portions where i have doubts. > 1). > i have an array X > if i calculate L=dot(X,X.transpose()) > can L be called the covariance m

[Numpy-discussion] svd and eigh

2008-05-02 Thread wilson
I am trying out the eigenvectors related functions in numpy.linalg.I came across some portions where i have doubts. 1). i have an array X if i calculate L=dot(X,X.transpose()) can L be called the covariance matrix of X?I read so in a paper by Turk&Pentland(equation 3 i think) can someone clarify t

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-25 Thread Travis E. Oliphant
Lou Pecora wrote: > Travis, Does that mean it's not worth starting a > ticket? Sounds like nothing can be done, *except* to > put this in the documentation and the FAQ. It has > bitten several people. > You can start a ticket with a milestone of 1.1, but I don't think it is worth it, given

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-25 Thread Lou Pecora
Travis, Does that mean it's not worth starting a ticket? Sounds like nothing can be done, *except* to put this in the documentation and the FAQ. It has bitten several people. --- "Travis E. Oliphant" <[EMAIL PROTECTED]> wrote: > Stéfan van der Walt wrote: >> Lou Pecora wrote: > >> Thanks, Mat

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-24 Thread Travis E. Oliphant
Stéfan van der Walt wrote: > On Mon, Mar 24, 2008 at 6:04 PM, Lou Pecora <[EMAIL PROTECTED]> wrote: > >> --- Matthieu Brucher <[EMAIL PROTECTED]> >> wrote: >> >> >> > It was added as a compile-time #define on the SVN >> > some days ago ;) >> > >> > Matthieu >> >> Thanks, Matthieu, that's

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-24 Thread Stéfan van der Walt
On Mon, Mar 24, 2008 at 6:04 PM, Lou Pecora <[EMAIL PROTECTED]> wrote: > > --- Matthieu Brucher <[EMAIL PROTECTED]> > wrote: > > > > It was added as a compile-time #define on the SVN > > some days ago ;) > > > > Matthieu > > Thanks, Matthieu, that's a good step. But when the > SVD function

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-24 Thread Lou Pecora
--- Matthieu Brucher <[EMAIL PROTECTED]> wrote: > It was added as a compile-time #define on the SVN > some days ago ;) > > Matthieu Thanks, Matthieu, that's a good step. But when the SVD function throws an exception is it clear that the user can redefine niter and recompile? Otherwise, the fi

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-24 Thread Matthieu Brucher
It was added as a compile-time #define on the SVN some days ago ;) Matthieu 2008/3/24, Zachary Pincus <[EMAIL PROTECTED]>: > > Hi all, > > > > I looked at line 21902 of dlapack_lite.c, it is, > > > >for (niter = iter; niter <= 20; ++niter) { > > > > Indeed the upper limit for iterations

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-24 Thread Zachary Pincus
Hi all, > I looked at line 21902 of dlapack_lite.c, it is, > >for (niter = iter; niter <= 20; ++niter) { > > Indeed the upper limit for iterations in the > linalg.svd code is set for 20. For now I will go with > my method (on earlier post) of squaring the matrix and > then doing svd when

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-19 Thread Charles R Harris
On Wed, Mar 19, 2008 at 11:30 AM, Lou Pecora <[EMAIL PROTECTED]> wrote: > I recently had a personal email reply from Damian > Menscher who originally found the error in 2002. He > states: > > -- > > I explained the solution in a followup to my own post: > http://mail.python.org/pipermail/pyth

Re: [Numpy-discussion] SVD error in Numpy. NumPy Update reversed?

2008-03-19 Thread Lou Pecora
I recently had a personal email reply from Damian Menscher who originally found the error in 2002. He states: -- I explained the solution in a followup to my own post: http://mail.python.org/pipermail/python-list/2002-August/161395.html -- in short, find the dlasd4_ routine (for the current

Re: [Numpy-discussion] SVD error in Numpy. Bug?

2008-03-19 Thread Lou Pecora
I tried sending this message yesterday, but it is being held up because the MatrixMarket attachment is too large. The moderator my release it to the group, but I don't know so I am sending the original message minus the attachment. If anyone wants the MatrixMarket version of my problem matrix, ju

Re: [Numpy-discussion] SVD error in Numpy. Bug?

2008-03-18 Thread Nils Wagner
On Tue, 18 Mar 2008 12:48:31 -0700 (PDT) Lou Pecora <[EMAIL PROTECTED]> wrote: > I have run into a failure of complex SVD in numpy > (version='1.0.3.1'). The error is: > > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/linalg/linalg.py", > line 767,

Re: [Numpy-discussion] SVD error in Numpy. Bug?

2008-03-18 Thread Matthieu Brucher
Hi, I think it could happen, the search for an eignevalue is an iterative process that can diverge sometimes. All SVD implementations have this hard coded-limitation, so that the biorthogonalization can finish in finite time. What is the determinant of your matrix ? Matthieu 2008/3/18, Lou Pecor

[Numpy-discussion] SVD error in Numpy. Bug?

2008-03-18 Thread Lou Pecora
I have run into a failure of complex SVD in numpy (version='1.0.3.1'). The error is: File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/linalg/linalg.py", line 767, in svd raise LinAlgError, 'SVD did not converge' numpy.linalg.linalg.LinAlgError: SVD d

Re: [Numpy-discussion] svd() and eigh()

2008-03-01 Thread Arnar Flatberg
On Sat, Mar 1, 2008 at 2:43 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi > i have a set of images of faces which i make into a 2d array using > numpy.ndarray > each row represents a face image > faces= > [[ 173. 87. ... 88. 165.] > [ 158. 103. .. 73. 143.] > [ 180. 87

[Numpy-discussion] svd() and eigh()

2008-03-01 Thread [EMAIL PROTECTED]
hi i have a set of images of faces which i make into a 2d array using numpy.ndarray each row represents a face image faces= [[ 173. 87. ... 88. 165.] [ 158. 103. .. 73. 143.] [ 180. 87. .. 55. 143.] [ 155. 117. .. 93. 155.]] from which i can get the mean image => avgface=a

Re: [Numpy-discussion] svd headers and diagonals

2007-05-06 Thread dpn
Somehow your suggestion made me think about using diag, Thanks :) >>> mm(u,mm(numpy.diag(s),v)) matrix([[ 4., 2.], [ 2., 4.]]) Now if anyone knows how to set headers for matrices or arrays? dpn On 5/6/07, Matthieu Brucher <[EMAIL PROTECTED]> wrote: > Don't forget that '*' is element-wi

  1   2   >