slope_derivative¶
- slope_derivative(X: ndarray) ndarray[source]¶
Numba slope derivative transformation for a 1d numpy array.
Finds the derivative of the series, padding the first and last values so that the length stays the same.
- Parameters:
- X1d numpy array
A 1d numpy array of values
- Returns:
- arr1d numpy array
The slope derivative of the series
Examples
>>> import numpy as np >>> from aeon.utils.numba.general import slope_derivative >>> X = np.array([1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) >>> X_der = slope_derivative(X)