Unexpected results when using np.interp for 2D data interpolation
I'm trying to use `np.interp` to interpolate values for a 2D grid. My grid is defined by two 1D arrays that represent the x and y coordinates, and I want to interpolate the corresponding z values. However, I'm getting unexpected results that don't seem to match the input data. My input arrays look like this: ```python import numpy as np x = np.array([0, 1, 2, 3]) y = np.array([0, 1, 2, 3]) # Define a grid of z values z = np.array([[0, 1, 2, 3], [1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6]]) # My points for which I want to interpolate xi = np.array([1.5, 2.5]) yi = np.array([1.5, 2.5]) ``` To interpolate, I thought I could do something like this: ```python zi = np.interp(xi, x, z) ``` However, this raises an behavior when I run it: `ValueError: x and xp must be the same shape`. I've tried reshaping `z` to match the dimensions of `xi` and `yi`, but it still doesn't work, and the results I'm getting are not what I expect. I also considered using `scipy.interpolate.griddata`, but that feels overkill for my use case. What is the correct approach to interpolate 2D data like this using NumPy? Am I missing something obvious? Thanks for taking the time to read this!