Python integrate 2d array