svd in numpy

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

svd in numpy

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?
Can anyone please give some suggestions?
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: svd in numpy

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 anyone else face a similar problem?
> Can anyone please give some suggestions?
> ------------------------------------------------------------------------
>
> _______________________________________________
> Numpy-discussion mailing list
> [hidden email]
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>  
Hi,
Please ensure that you have the latest version of numpy (either 1.1 when
it gets released or one from the svn) - see Ticket 627:
http://www.scipy.org/scipy/numpy/ticket/627

Bruce


_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: svd in numpy

cdavid
In reply to this post by Nripun Sredar
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 anyone else face a similar problem?
> Can anyone please give some suggestions?

Are you on windows ? What is the CPU on your machine ? I suspect this is
caused by windows binaries which shipped blas/lapack without support for
"old" CPU.

cheers,

David
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: svd in numpy

Zachary Pincus-2
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 in the matrix. Even
>> this is in an infinite loop.
>> Did anyone else face a similar problem?
>> Can anyone please give some suggestions?
>
> Are you on windows ? What is the CPU on your machine ? I suspect  
> this is
> caused by windows binaries which shipped blas/lapack without support  
> for
> "old" CPU.

I have seen this issue as well, on Windows XP running on a Core2 Duo.  
(But... it was a virtualized environment with VirtualBox, so I don't  
know if that disables the SSE features.)

Anyhow, this was with the latest windows binaries, I think  
(numpy-1.0.4.win32-py2.5.msi), and had the same issue: infinite loop  
with 100% processor doing a SVD. (Non-sparse array, though.)

Zach
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: svd in numpy

Nripun Sredar
In reply to this post by cdavid
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 binaries numpy-1.0.4.win32-py2.5.msi.
 


 
On Sat, May 17, 2008 at 2:34 AM, David Cournapeau <[hidden email]> 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 in the matrix. Even
> this is in an infinite loop.
> Did anyone else face a similar problem?
> Can anyone please give some suggestions?

Are you on windows ? What is the CPU on your machine ? I suspect this is
caused by windows binaries which shipped blas/lapack without support for
"old" CPU.

cheers,

David
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion


_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: svd in numpy

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 is
> with the latest windows binaries numpy-1.0.4.win32-py2.5.msi.
>  
>
>
>  
> On Sat, May 17, 2008 at 2:34 AM, David Cournapeau
> <[hidden email] <mailto:[hidden email]>>
> 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 in the matrix. Even
>     > this is in an infinite loop.
>     > Did anyone else face a similar problem?
>     > Can anyone please give some suggestions?
>
>     Are you on windows ? What is the CPU on your machine ? I suspect
>     this is
>     caused by windows binaries which shipped blas/lapack without
>     support for
>     "old" CPU.
>
>     cheers,
>
>     David
>     _______________________________________________
>     Numpy-discussion mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Numpy-discussion mailing list
> [hidden email]
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>  
Hi,
The issue relates to the closed ticket 627:
http://www.scipy.org/scipy/numpy/ticket/627

Please update to the latest Numpy 1.1 (rc1 is available) or, as a
temporary measure, use the installer:

http://www.ar.media.kyoto-u.ac.jp/members/david/archives/numpy-superpack-python2.5.exe 


That uses numpy version 1.0.5.dev5008 which should solve you problem.

Regards
Bruce
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: svd in numpy

Nripun Sredar
Thank You.. The problem is resolved

On Mon, May 19, 2008 at 10:31 AM, Bruce Southey <[hidden email]> 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 sparse and non-sparse matrices. This is
> with the latest windows binaries numpy-1.0.4.win32-py2.5.msi.
>
>
>
>
> On Sat, May 17, 2008 at 2:34 AM, David Cournapeau
> <[hidden email] <mailto:[hidden email]>>
> 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 in the matrix. Even
>     > this is in an infinite loop.
>     > Did anyone else face a similar problem?
>     > Can anyone please give some suggestions?
>
>     Are you on windows ? What is the CPU on your machine ? I suspect
>     this is
>     caused by windows binaries which shipped blas/lapack without
>     support for
>     "old" CPU.
>
>     cheers,
>
>     David
>     _______________________________________________
>     Numpy-discussion mailing list
>     [hidden email] <mailto:[hidden email]>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Numpy-discussion mailing list
> [hidden email]
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
Hi,
The issue relates to the closed ticket 627:
Please update to the latest Numpy 1.1 (rc1 is available) or, as a
temporary measure, use the installer:

http://www.ar.media.kyoto-u.ac.jp/members/david/archives/numpy-superpack-python2.5.exe


That uses numpy version 1.0.5.dev5008 which should solve you problem.

Regards
Bruce
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion


_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: svd in numpy

cdavid
In reply to this post by Bruce Southey
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 sparse and non-sparse matrices. This is
>> with the latest windows binaries numpy-1.0.4.win32-py2.5.msi.
>>    

There was a problem with the way those binaries were built, depending on
your CPU. Hopefully, the new binary for 1.1.0 will not have this problem
anymore. When available, please test it and report whether it is working
or not for you,

thanks,

David
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion