更新时间:2022-06-05 09:10:21
我知道了.谢谢@Ludovic
I figured it out. Thanks @Ludovic
m=100 n=100 MV=0.4 idx = np.random.permutation(m*n) idx2 = idx[1:round(MV*m*n)] Q.reshape(-1, 1)[idx2] = 0
如何删除矩阵中的某些条目.我正在从Matlab转换为python