Operations on sparse matrices

P

pp

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
 
P

pp

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

Robert Kern

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

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
 
H

Helmut Jarausch

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top