I do not distinguish between coo_matrix, csr_matrixand csc_matrix.
The documentation mentions that coo_matrix is not efficient for arithmetic operations, and we need to convert it to csror csc. I look more at matrix multiplication. And I did not understand what was going on behind the scenes, if I only had to coo_matrixconvert it to a matrix csror csv.
Also, if I have something like
A = array([[1,2,3,0,0,5],
[5,0,0,1,2,0]])
print coo_matrix(A)
He is typing
(0, 0) 1
(0, 1) 2
(0, 2) 3
(0, 5) 5
which is great. but is there a way, I can directly enter my matrix as printed. Something like defining a COO matrix zero, and then start defining values coo_matrix, as is done in matlab.
Thank!
source
share