2D Ising model simulation in Python