Multiply dense numpy matrix with sparse scipy vector
| Newsgroups | gmane.comp.python.scientific.user |
|---|---|
| Message-ID | <[email protected]> |
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?