Re: [Numpy-discussion] How to apply Numpy ufunc to Scipy sparse matrices?

2011-09-11 Thread Pauli Virtanen
Sun, 11 Sep 2011 03:03:26 -0500, Pengkui Luo wrote: [clip] However, converting a large sparse matrix to dense would easily eat up the memory. Is there a way for np.sign (as well as other ufunc) to take a sparse matrix as parameter, and return a sparse matrix? For CSR, CSC, and DIA you can do

Re: [Numpy-discussion] How to apply Numpy ufunc to Scipy sparse matrices?

2011-09-11 Thread Pengkui Luo
On Sun, Sep 11, 2011 at 13:23, Pauli Virtanen p...@iki.fi wrote: Sun, 11 Sep 2011 03:03:26 -0500, Pengkui Luo wrote: [clip] However, converting a large sparse matrix to dense would easily eat up the memory. Is there a way for np.sign (as well as other ufunc) to take a sparse matrix as

Re: [Numpy-discussion] recarrays and lists of lists

2011-09-11 Thread Travis Vaught
On Sep 11, 2011, at 2:58 AM, Robert Kern wrote: On Sun, Sep 11, 2011 at 00:30, Travis Vaught tra...@vaught.net wrote: Greetings, Is there a particular reason why a list of lists can't be passed in to create a recarray given a particular dtype? A list of tuples works fine. I keep

Re: [Numpy-discussion] recarrays and lists of lists

2011-09-11 Thread Robert Kern
On Sun, Sep 11, 2011 at 14:44, Travis Vaught tra...@vaught.net wrote: On Sep 11, 2011, at 2:58 AM, Robert Kern wrote: On Sun, Sep 11, 2011 at 00:30, Travis Vaught tra...@vaught.net wrote: Greetings, Is there a particular reason why a list of lists can't be passed in to create a recarray