May-16-2019, 10:15 PM
I have a matrix 682x10 and I have problem with one task. I want to do for each j-column Xj=(Xj-min(Xj))/(max(Xj)-min(Xj)). Of course, I know how to do this with for. But I have to use numpy library.I tried it this way:
X[0:] = (X[0:] - np.min(X[0:])) / (np.max(X[0:]) - np.min(X[0:]))But:
Error:NotImplementedError: subtracting a nonzero scalar from a sparse matrix is not supported