- cupy.ediff1d(arr, to_end=None, to_begin=None)[source]#
Calculates the difference between consecutive elements of an array.
arr (cupy.ndarray) – Input array.
to_end (cupy.ndarray, optional) – Numbers to append at the end of the returend differences.
to_begin (cupy.ndarray, optional) – Numbers to prepend at the beginning of the returned differences.
New array consisting differences among succeeding elements.
- Return type