[SciPy-User] Dotting two sparse rows

Matt Henderson matthen@gmail....
Thu Nov 10 05:36:12 CST 2011

Hi there,

I need to dot two csr matrices with shapes (1, 25675), (1, 25675) together,
giving a single number.  These rows are extremely sparse- with around 20
non-zero entries each.  What's the fastest way to do this? I know the
following works:

np.dot(a, b.T).todense()[0,0]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20111110/6a085df1/attachment.html 

More information about the SciPy-User mailing list