Re: scipy sparse matrix question

2010-03-09 Thread Robert Kern
On 2010-03-09 14:52 PM, Victor Eijkhout wrote: Terry Reedy wrote: My specific question: what does "for x in A" give me when A is a sparse matrix? Try it and see what you get. Ah, how do I see what I get? If I print it it looks plausible, but I don't know how to pull it apart. It doesn't se

Re: scipy sparse matrix question

2010-03-09 Thread Victor Eijkhout
Terry Reedy wrote: > > My specific question: what does "for x in A" give me when A is a sparse > > matrix? > > Try it and see what you get. Ah, how do I see what I get? If I print it it looks plausible, but I don't know how to pull it apart. It doesn't seem to be an array. Victor. -- Victor

Re: scipy sparse matrix question

2010-03-09 Thread Terry Reedy
On 3/9/2010 1:14 AM, Victor Eijkhout wrote: I can't find any detailed information about scipy.sparse. Scipy questions are best asked on the scipy list, which I suspect you can also access via news.gmane.org. My specific question: what does "for x in A" give me when A is a sparse matrix?

Re: scipy sparse matrix question

2010-03-09 Thread Robert Kern
On 2010-03-09 00:14 AM, Victor Eijkhout wrote: I can't find any detailed information about scipy.sparse. The place to ask would be on scipy-user: http://www.scipy.org/Mailing_Lists My specific question: what does "for x in A" give me when A is a sparse matrix? It seems to yield all nonzero

scipy sparse matrix question

2010-03-08 Thread Victor Eijkhout
I can't find any detailed information about scipy.sparse. My specific question: what does "for x in A" give me when A is a sparse matrix? It seems to yield all nonzero locations, but in what kind of form? Very specifically: how do I get the (i,j) coordinates and the value from x? Victor. -- Vic