Takes in an expression and returns an expression with the kth order differences along the given axis. The output shape is the same as the input except the size along the specified axis is reduced by k.
cvxr_diff(x, k = 1L, axis = 2L)An Expression representing the kth order differences.
An Expression or numeric value.
Integer. The number of times values are differenced. Default is 1.
(Mapped from R's lag argument in diff.default; use differences for
repeated differencing which maps to k here.)
Integer. The axis along which the difference is taken. 2 = along rows/down columns (default), 1 = along columns/across rows.