Skip to main content

diff

Function diff 

Source
pub fn diff<T>(input: &Array<T, Ix1>, n: usize) -> FerrayResult<Array<T, Ix1>>
where T: Element + Sub<Output = T> + Copy,
Expand description

Compute the n-th discrete difference along the given axis.

AC-11: diff([1,3,6,10], 1) == [2,3,4].