first_order_differences_2d¶
- first_order_differences_2d(X: ndarray) ndarray[source]¶
Numba first order differences function for a 2d numpy array.
- Parameters:
- X2d numpy array
A 2d numpy array of values
- Returns:
- arr2d numpy array of shape (X.shape[0], X.shape[1] - 1)
The first order differences for axis 1 of the input array
Examples
>>> import numpy as np >>> from aeon.utils.numba.general import first_order_differences_2d >>> X = np.array([[1, 2, 2, 3, 3, 3, 4, 4, 4, 4], [5, 6, 6, 7, 7, 7, 8, 8, 8, 8]]) >>> diff = first_order_differences_2d(X)