You can perform element-wise operations on sparse matrices using standard NumPy functions after converting them to dense format.
For example:
import scipy.sparse as sp
import numpy as np
sparse_matrix = sp.csr_matrix([[1, 0, 2], [0, 3, 0]])
# Convert to dense matrix and perform element-wise multiplication
dense_matrix = sparse_matrix.toarray()
result = dense_matrix * 2