Alas, the scipy and Theano of the CSC matrix and CSR matrix in the sparse matrix on the internet are too few, have, and only use, and do not explain how the matrix was generated. Reference 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]]
This inside indices is good to say, is not 0 data 7,8,9 This three number in the matrix row number, that inptr is what ghost thing, its all spell is index pointer array. Do not know what to do at all, the end of the original is this, we also take the above example as an example:
Data:7 8 9
indices:0 1 2
Indptr:0 2 3 3
That means 7 and 8 are 0 columns, 9 are 1 columns. 7 on 0 Columns 0 rows, 8 on 0 columns 1 rows, 9 in 1 columns 2 rows, the remaining elements are all 0, thus forming a
[7 0 0] [8 0 0] [0 9 0]]
In fact, this is from Csparse, there is a better example of this:
Csparse
If we are not clear about this, I have been a victim of the people are willing to provide more answers.
SciPy csc CSR What the hell is this thing?