9-csr_matrix.multiply(B)-对应元素相乘
import numpy as npfrom scipy.sparse import csr_matrixA=csr_matrix(np.array([[1,0,0],[1,2,3],[2,2,2]]))B=csr_matrix(np.array([[2,0,0],[2,2,0],[3,3,3]]))C=A.multiply(B)print(C.toarray())[[2 0 0][2 4 0][6 6 6]]