Python Maximum Value Of A Matrix Squared