How to pass arrays into Scipy Interpolate RectBivariateSpline?
I am creating a Scipy Interpolate RectBivariateSpline as follows: import numpy as np from scipy.interpolate import RectBivariateSpline x = np.array([1,2,3,4]) y = np.array([1,2,3,4,5]) vals = np.array([ [4,1,4,4,2], [4,2,3,2,6], [3,7,4,3,5], [2,4,5,3,4] ]) rect_B_spline = RectBivariateSpline(x, y, vals) I then try to pass-in an array of x and y points: a = np.array([3.2, 3.8, 2.2]) b = np.array([2.4, 4.3, 3.3]) print(rect_B_spline(a, b)) To which I get an error as follows: Traceback (most recent call last): File "path/file", line 18, in <module> print(rect_B_spline(a, b)) File "/path/scipy