pyarrow.compute.inverse_permutation#
- pyarrow.compute.inverse_permutation(indices, /, max_index=-1, output_type=None, *, options=None, memory_pool=None)#
Return the inverse permutation of the given indices.
For the i-th index in indices, the index-th output is i
- Parameters:
- indicesArray-like
Argument to compute function.
- max_index
int64, default -1 The max value in the input indices to allow. The length of the function’s output will be this value plus 1. If negative, this value will be set to the length of the input indices minus 1 and the length of the function’s output will be the length of the input indices.
- output_type
DataType, defaultNone The data type for the output array of inverse permutation. If None, the output will be of the same type as the input indices, otherwise must be a signed integer type. An invalid error will be reported if this type is not able to store the length of the input indices.
- options
pyarrow.compute.InversePermutationOptions, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool, optional If not passed, will allocate memory from the default memory pool.