I would like to interpolate array-valued data, i.e., the x-values are one-dimensional, but the y-values are (NumPy) arrays. The following doesn't work:
import numpy as np
xp = np.array([0.0, 1.0, 2.0])
yp = np.array(
[
[-1.1, 2.4, 5.1, 5.6],
[7.1, -2.1, 9.1, 31.0],
[1.1, 13.4, -5.2, 5.6],
]
)
np.interp(0.4, xp, yp)
ValueError: object too deep for desired array
Any hints?