type(A)
<class 'scipy.sparse.csc.csc_matrix'>
A.shape
(8529, 60877)
print A[0,:]
(0, 25) 1.0
(0, 7422) 1.0
(0, 26062) 1.0
(0, 31804) 1.0
(0, 41602) 1.0
(0, 43791) 1.0
print A[1,:]
(0, 7044) 1.0
(0, 31418) 1.0
(0, 42341) 1.0
(0, 47125) 1.0
(0, 54376) 1.0
print A[:,0]
#nothing returned
Now what I don't understand is that A[1,:]
should select elements from the 2nd row, yet I get elements from the 1st row via print A[1,:]
. Also, print A[:,0]
should return the first column but I get nothing printed. Why?