diff(a, n=1, axis=-1, prepend=None, append=None)¶
Calculate the n-th discrete difference along the given axis.
a (cupy.ndarray) – Input array.
n (int) – The number of times values are differenced. If zero, the input is returned as-is.
axis (int) – The axis along which the difference is taken, default is the last axis.
The result array.
- Return type