grid2d python