I've a numpy array of shape (960, 2652)
, I want to change its size to (1000, 1600)
using linear/cubic interpolation.
>>> print(arr.shape)
(960, 2652)
I've check this and this answer, which recommends to use scipy.interpolate.interp2d
, but what should I provide as x
and y
?
from scipy import interpolate
f = interpolate.interp2d(x, y, arr, kind='cubic')