Best way to interpolate a numpy.ndarray along an axis
问题 I have 4-dimensional data, say for the temperature, in an numpy.ndarray . The shape of the array is (ntime, nheight_in, nlat, nlon) . I have corresponding 1D arrays for each of the dimensions that tell me which time, height, latitude, and longitude a certain value corresponds to, for this example I need height_in giving the height in metres. Now I need to bring it onto a different height dimension, height_out , with a different length. The following seems to do what I want: ntime, nheight_in,