[SciPy-User] indexation of sparse matrices

Dmitrey tmp50 at ukr.net
Sun Dec 13 08:44:52 EST 2009


hi all,  
suppose I have a scipy.sparse matrix A and positions of elements to be extracted I = (2,3,4), J = (0,1,5).  
how can I get vector val (Python list or numpy array) that contains the elements A[2,0], A[3,1], A[4,5]?  
I haven't found it in scipy.sparse doc.  
  
And, if anyone knows, how can I get it from dense numpy array A?  
  
Thank you in advance, D.  
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20091213/931c164f/attachment.html>


More information about the SciPy-User mailing list