### How do i create interacting sparse matrix?

Suppose I have two sparse matrix: from scipy.sparse import random from scipy import stats S0 = random(5000,100, density=0.01) S1 = random(5000,100,density=0.01) I want to create a sparse matrix S2, where the shape is (5000,100*100). (in my real application, this ‘5000’ should be 20 million). For each row, it is some kind of interaction within this…

Details