summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/interp.py b/interp.py
index c57f417..f0f5693 100644
--- a/interp.py
+++ b/interp.py
@@ -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)