is there an easy way to shuffle a sparse matrix in python?
This is how I shuffle a non-sparse matrix:
index = np.arange(np.shape(matrix)[0])
np.random.shuffle(index)
return matrix[index]
How can I do it with numpy sparse?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…