Boltzmann Partition Function Python Example Test