Skip to content

diff

builtin · libnexusinterp/corefcn/data-proprietary.cc

: y = diff (x)
: y = diff (x, n)
: y = diff (x, n, dim)

Differences between adjacent elements. n repeats the operation (n = [] means one) and dim selects the dimension, by default the first non-singleton one. When the order exceeds the extent along a default dimension the next non-singleton dimension is used.