permutation_indices

permutation_indices(n, r, dtype=<class 'int'>): 

LLM Docstring

Enumerate all length-r ordered permutations of range(n) as an index array.

  • n: int

    size of the pool

  • r: int

    length of each permutation

  • dtype: np.dtype

    index dtype

  • :returns: np.ndarray

    the (n!/(n-r)!, r) permutation-index array


Feedback

Examples

Templates

Documentation