As @Joe Kington suggested using map_coordinates :
import scipy.ndimage as nd
Above for the following y :
array([ 8.00091648, 0.46124587, 7.03994936, 1.26307275, 1.51068952, 5.2981205 , 7.43509764, 7.15198457, 5.43442468, 0.79034372])
Note. Each value indicates the position at which the value will be interpolated for each row.
Gives the following result :
array([ 8.00091648, 10.46124587, 27.03994936, 31.26307275, 41.51068952, 55.2981205 , 67.43509764, 77.15198457, 85.43442468, 90.79034372])
which makes sense given the nature of the arange d data and the columns ( y ) at which it is interpolated.
source share