(indices, size)
return mask
Convert an array of integer indices into a boolean mask index.
    The elements in indices must be unique.

    :param ndarray[int] indices: Integer indices.
    :param int size: Size of the resulting mask.
Convert an array of integer indices into a boolean mask index.
    The elements in indices must be unique.
Convert an array of integer indices into a boolean mask index . The elements in indices must be unique .
def indices_to_mask(indices, size):
    """
    Convert an array of integer indices into a boolean mask index.
    The elements in indices must be unique.

    :param ndarray[int] indices: Integer indices.
    :param int size: Size of the resulting mask.

    """
    mask = np.zeros(size, dtype=bool)
    mask[indices] = True
    return mask
def indices_to_mask ( indices , size ) : mask = np . zeros ( size , dtype = bool ) mask [ indices ] = True return mask