Particle Mesh in Python