ising model metropolis algorithm python.