(n, a, b)
return out
Get all permutations of [a, b, ..., b] of length n. len(out) == n.
Get all permutations of [a, b, ..., b] of length n. len(out) == n.
Get all permutations of [ a b ... b ] of length n . len ( out ) == n .
def _s(n, a, b):
    """Get all permutations of [a, b, ..., b] of length n. len(out) == n."""
    out = np.full((n, n), b)
    np.fill_diagonal(out, a)
    return out
def _s ( n , a , b ) : out = np . full ( ( n , n ) , b ) np . fill_diagonal ( out , a ) return out