• full name:

  • parent module:

  • type: function[source]

reverse sorting indices.

Sort functions (as LegCharge.sort()) return a (1D) permutation perm array, such that sorted_array = old_array[perm]. This function inverts the permutation perm, such that old_array = sorted_array[inverse_permutation(perm)].


perm (1D array_like) – The permutation to be reversed. Assumes that it is a permutation with unique indices. If it is, inverse_permutation(inverse_permutation(perm)) == perm.


inv_perm – The inverse permutation of perm such that inv_perm[perm[j]] = j = perm[inv_perm[j]].

Return type:

1D array (int)