Thank you for the reply. For my case, suggest the mask is [1, 0, 1, 0], for the output location at [1.2], the output value will be input[0](1.8/2)+input[1](0.2/2). Which means, I will find the nearest points whose masks are not zero for the linear interpolation.