Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The use of numpy.matmul with a non-sparse matrix can be slower because non-sparse matrices require more computation and memory usage. Non-sparse matrices store all the values in the matrix, while sparse matrices only store the non-zero values, resulting in more efficient computation and memory usage. This means that operations on non-sparse matrices can take longer to compute and require more memory to store the matrix. Additionally, operations on non-sparse matrices may require more computer cache misses, resulting in slower performance.