This is documentation for an old release of SciPy (version 0.10.1). Read this page in the documentation of the latest stable release (version 1.15.1).
Remove linear trend along axis from data.
Parameters : | data : array_like
axis : int, optional
type : {‘linear’, ‘constant’}, optional
bp : array_like of ints, optional
|
---|---|
Returns : | ret : ndarray
|
Examples
>>> randgen = np.random.RandomState(9)
>>> npoints = 1e3
>>> noise = randgen.randn(npoints)
>>> x = 3 + 2*np.linspace(0, 1, npoints) + noise
>>> (sp.signal.detrend(x) - noise).max() < 0.01
True