pyarrow.compute.pairwise_diff_checked#
- pyarrow.compute.pairwise_diff_checked(input, /, period=1, *, options=None, memory_pool=None)#
Compute first order difference of an array.
Computes the first order difference of an array, It internally calls the scalar function “subtract_checked” (or the checked variant) to compute differences, so its behavior and supported types are the same as “subtract_checked”. The period can be specified in :struct:`PairwiseOptions`.
This function returns an error on overflow. For a variant that doesn’t fail on overflow, use function “pairwise_diff”.
- Parameters:
- inputArray-like
Argument to compute function.
- period
int, default 1 Period for applying the period function.
- options
pyarrow.compute.PairwiseOptions, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool, optional If not passed, will allocate memory from the default memory pool.