def swpmtx(N):
    r"""

    swap an unit array randomly.

    Arguments
    ----------------
    N : int
        signal dimesion.

    Returns
    -------------------
    T tensor
        swap matrix.
    """


