python - Apply numpy interpolation function with index array -
i have index-matrix , matrix variables of same sizes:
index = [a, c, c, b] m = [0.23, 0.45, 1, 0.7]
now need apply interpolation function using variables in m, based on index in index-matrix need choose different values. values interpolate between:
a = [(1, 0), (2, 0.2), (3, 0.6)] b = [(1, 0), (2, 0.5), (3, 0.9)] c = [(1, 0), (2, 0.3), (3, 0.5)]
so, first calculation value 0.23 , index a. need apply numpy.interp using coordinates in , on.
i can zip index , m , apply numpy.interp on value value basis. since need apply huge datasets quicker way.
Comments
Post a Comment