interp3d
interp3d copied to clipboard
out of bounds check too strict
Shouldnt the out of bounds check be inclusive of the maximum indices?
So
if x0 >= 0 and y0 >= 0 and z0 >= 0 and x1 <= X and y1 <= Y and z1 <= Z:
instead of
if x0 >= 0 and y0 >= 0 and z0 >= 0 and x1 < X and y1 < Y and z1 < Z
?
No.
In an array with N elements they are indexed from 0 to N-1.
So it is correct to have boundary >=0 and <N