def _inverse_permutation(p):
 n = p.size
 s = np.zeros(n, dtype=np.int32)
 i = np.arange(n, dtype=np.int32)
 np.put(s, p, i)
 return s

def _inverse_permutation ( p ) : n = p . size s = np . zeros ( n , dtype = np . int32 ) i = np . arange ( n , dtype = np . int32 ) np . put ( s , p , i ) return s
inverse permutation p .