diff options
-rw-r--r-- | interp.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1,7 +1,7 @@ import numpy as np def interp1d(src_start, src_step, src_val, dst_coords, stencil): - idx_src = (dst_coords / src_step - src_start - (stencil / 2 - 1)).astype(np.int) + idx_src = ((dst_coords - src_start) / src_step - (stencil / 2 - 1)).astype(np.int) src_coord = np.linspace(src_start, src_start + src_step * (src_val.shape[0] - 1), src_val.shape[0], dtype = src_val.dtype) |