What is scipy csc csr and scipycsccsr?
Ah, zhennima, the number of csc matrix and csr matrix in scipy and theano's sparse matrix on the internet is too small. If yes, it is only used. It does not explain how the matrix is generated. Example:
>>> data = np.asarray([7, 8, 9])>>> indices = np.asarray([0, 1, 2])>>> indptr = np.asarray([0, 2, 3, 3])>>> m = sp.csc_matrix((data, indices, indptr), shape=(3, 3))>>> print m.toarray()[[7 0 0] [8 0 0] [0 9 0]]
Here, indices is better to say, that is, the number of rows with non-zero data, 7, 8, and 9 in the Matrix. What is inptr and the full fight is index pointer array. I don't know what to do. It turned out to be like this. We also use the above example:
Data: 7 8 9
Indices: 0 1 2
Indptr: 0 2 3 3
That is to say, 7 and 8 are 0 columns and 9 are 1 columns. 7 is in the 0 column 0 row, 8 is in the 0 column 1 row, 9 is in the 1 column 2 row, and the remaining elements are all 0, thus forming
[7 0 0] [8 0 0] [0 9 0]]
In fact, this is because of csparse. There is a better example of this:
Csparse
If you are not clear about this, I am a victim of this situation and would like to provide more answers.