How does coo_matrix((data, (i, j)), [shape=(M, N)]) work?

Matti Viljamaa <[email protected]>
Newsgroups gmane.comp.python.scientific.user
Message-ID <[email protected]>
I’m confused about the following instantiation of coo_matrix:

coo_matrix((data, (i, j)), [shape=(M, N)])

data contains the entries of the matrix in any order. Why can they be in any order? Is data a vector or a matrix?

What are i,j used for?

BR, Matti

_______________________________________________
SciPy-User mailing list
[email protected]
https://mail.python.org/mailman/listinfo/scipy-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.