Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Operations on sparse matrices

3 views
Skip to first unread message

pp

unread,
Apr 19, 2010, 2:03:25 AM4/19/10
to
I am currently dealing with sparse matrices and have doubts on whether
we can use
1.) dot (for matrix multiplication) and inv (inverse) operations of
numpy on sparse matrices of CSR format.

I initially constructed my sparse matrix using COO format and then
converted it to CSR format now I want to know whether normal inverse
and matrix multiplications work with sparse csr matrices.

Also can these operations be applied directly to csr matrices


Thanks a lot

pp

unread,
Apr 19, 2010, 3:38:03 AM4/19/10
to
I tried csr_matrix.dot(A,N) where A and N are two sparse matrices.
is it correct for multiplication of two sparse matrices ?
I still do not now how to perform matrix inversion for a sparse
matrix. Can anyone please help.

Thanks!!

Robert Kern

unread,
Apr 19, 2010, 3:14:09 PM4/19/10
to pytho...@python.org

You will want to ask scipy questions on the scipy mailing list.

http://www.scipy.org/Mailing_Lists

--
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

Helmut Jarausch

unread,
Apr 21, 2010, 4:14:44 AM4/21/10
to
On 04/19/10 08:03, pp wrote:
> I am currently dealing with sparse matrices and have doubts on whether
> we can use
> 1.) dot (for matrix multiplication) and inv (inverse) operations of
> numpy on sparse matrices of CSR format.
>

I don't know of any use of the inverse of a sparse matrix.
Note, in nearly all cases the inverse of a sparse matrix is a full matrix.
Instead of inverting a matrix solve a linear system with that matrix.
What do you need the inverse for?

Helmut.


--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

0 new messages