Skip to content
Snippets Groups Projects
Commit 225aade2 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

bin_fit to interpolate also to single values

parent afdf309b
No related branches found
No related tags found
No related merge requests found
......@@ -191,7 +191,7 @@ def perpendicular_bin_fit(x, y, bins = 30, fit_func=None, bin_min_count=3, plt=N
#Create mean function
def _interpolate_fit(bin_x_fit, bin_y_fit, kind='linear'):
def fit(x):
x = x[:].copy().astype(np.float)
x = np.atleast_1d(x)[:].copy().astype(np.float)
x[x<bin_x_fit[0]] = np.nan
x[x>bin_x_fit[-1]] = np.nan
m = ~(np.isnan(bin_x_fit)|np.isnan(bin_y_fit))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment