Created
December 3, 2019 16:45
-
-
Save kaushil24/abe4f0e019cb31f66e6714455126089b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.interpolate import interp1d | |
def interpolateCoordinates(xy_coords, x_intrp): | |
x = xy_coords[:, 0] | |
y = xy_coords[:, 1] | |
intrp = interp1d(x, y, kind='quadratic') | |
y_intrp = intrp(x_intrp) | |
y_intrp = np.floor(y_intrp).astype(int) | |
return y_intrp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment