def discretize_center_2D(model, x_range, y_range):
 x = np.arange(*x_range)
 y = np.arange(*y_range)
 (x, y) = np.meshgrid(x, y)
 return model(x, y)

def discretize_center_2D ( model , x_range , y_range ) : x = np . arange ( * x_range ) y = np . arange ( * y_range ) ( x , y ) = np . meshgrid ( x , y ) return model ( x , y )
discretize model by taking the value at the center of the pixel .