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