n (int, optional) – The number of times values are differenced.
axis (int, optional) – The axis along which the difference is taken, default is the last axis.
Returns
diff (ndarray) – The n-th differences. The shape of the output is the same as a
except along axis where the dimension is smaller by n. The
type of the output is the same as that of the input.