Interpolation using lookup table

Hi,

I am trying to develop an function parameter that uses a lookup table of x,y,z to interpolate so that for any x,y value it can output a single z value. However, I get the error: 65 x1, x2 = x
66 if y.ndim != 2:

—> 67 raise ValueError(“y should be two-dimensional if len(x)=2”)
68 if x1.shape[0] != y.shape[0]:
69 raise ValueError(
70 “len(x1) should equal y=shape[1], "
71 f"but x1.shape={x1.shape} and y.shape={y.shape}”
72 )

ValueError: y should be two-dimensional if len(x)=2

for the interpolant:

D_charge = pybamm.Interpolant(
(i_area_char, conc_xno_char),
D_char,
(i_area, conc_xno)
)

Why has this happened and would anyone have any suggestions to fix?

Thanks!