how can I change the values of the diagonal of a matrix in numpy?
I checked Numpy modify ndarray diagonal, but the function there is not implemented in numpy v 1.3.0
Minimal. Code.
X[np.diag_indices_from(X)] = 0.