[SciPy-User] Multiply dense numpy matrix with sparse scipy vector

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[SciPy-User] Multiply dense numpy matrix with sparse scipy vector

list
Upon profiling, we found that multiplying a dense numpy matrix, e.g.

A = np.eye(5)

with a sparse scipy vector, e.g.

x = scipy.sparse.coo_matrix(np.eye(5)[4]).T

did in fact not make use of the sparsity of x when using @. That is:

A @ x

is not a sparse computation.

How can this be done?
_______________________________________________
SciPy-User mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/scipy-user