Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Options
=======
smoothing : bool
True or False. Smooth the signals with arguments provided as kwargs. Default method is whittaker smoothing. See the rampy.smooth function for smoothing options and arguments.
Returns
=======
centroid : Numpy array, n samples
signal centroid(s)
"""
y_ = y.copy()
if smoothing == True:
for i in range(x.shape[1]):
y_[:,i] = rampy.smooth(x[:,i],y[:,i],**kwargs)
return np.sum(y_/np.sum(y_,axis=0)*x,axis=0)