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
Did you try numpy.fill_diagonal? See the following answer and this discussion. Or the following from the documentation (although currently broken):
numpy.fill_diagonal
http://docs.scipy.org/doc/numpy/reference/generated/numpy.fill_diagonal.html