flattened index for Sparse Matrix?
4 Nov
2010
4 Nov
'10
1:46 p.m.
Hi Everyone, I am trying sparse matrix these days. I am wondering is there any way I can access the sparse matrix with flattened index? For example: a=numpy.matrix([[0,1,2],[3,4,5]) matrix([[0, 1, 2], [3, 4, 5]])
print a.flat[3]
3
a.flat[3]=10 print a
[[ 0 1 2] [10 4 5]]
How could I do the similar indexing for sparse matrix? Thanks ahead, LittleBigBrain
4921
Age (days ago)
4921
Last active (days ago)
0 comments
1 participants
participants (1)
-
braingateway