Use mtx.dot
instead of np.dot
as
blured = mtx.dot(img)
or just
blured = mtx * img # where mtx is sparse and img is `dense` or `sparse`
Two parameters of np.dot
is dealt with dense
even though one of them is sparse
.
So, this will raise MemoryError