Skip to content
Snippets Groups Projects
Commit 2b80f007 authored by Raphael's avatar Raphael
Browse files

minor

parent 0f0676bd
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ def compute_trajectory(times, time_gap):
def apply_func_on_window(dat, func, radius, on_edge='copy'):
result = np.zeros(dat.shape)
if on_edge == 'copy':
dat = np.concatenate([np.full(radius, dat[0]), dat, np.full(radius, dat[-1])])
dat = np.concatenate([np.repeat(dat[0], radius), dat, np.repeat(dat[-1], radius)])
for i in range(radius, dat.shape[0] - radius):
data = dat[i - radius:i + radius + 1]
result[i - radius] = func(data)
......
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