cytometer/data.py
def split_list(x, idx):
    """
    Split a list into two sublists.
    :param x: list to be split.
    :param idx: list of indices. Repeated indices are ignored.
    :return: x[idx], x[~idx]. Here ~idx stands for the indices not in idx.
    """

    # ignore repeated indices
    idx = set(idx)

    # indices for the second sublist
    idx_2 = list(set(range(len(x))) - idx)

    idx = list(idx)

    return list(np.array(x)[idx]), list(np.array(x)[idx_2])

    Split a list into two sublists.
    :param x: list to be split.
    :param idx: list of indices. Repeated indices are ignored.
    :return: x[idx], x[~idx]. Here ~idx stands for the indices not in idx.
    
Split a list into two sublists.
Split a list into two sublists .
def split_list(x, idx):
    idx = set(idx)
    idx_2 = list(set(range(len(x))) - idx)
    idx = list(idx)
    return list(np.array(x)[idx]), list(np.array(x)[idx_2])
def split_list ( x , idx ) : idx = set ( idx ) idx_2 = list ( set ( range ( len ( x ) ) ) - idx ) idx = list ( idx ) return list ( np . array ( x ) [ idx ] ) , list ( np . array ( x ) [ idx_2 ] )
Split a list into two sublists.
Split a list into two sublists .
"""
    Split a list into two sublists.
    :param x: list to be split.
    :param idx: list of indices. Repeated indices are ignored.
    :return: x[idx], x[~idx]. Here ~idx stands for the indices not in idx.
    """ # ignore repeated indices # indices for the second sublist
None
x
list to be split.
list to be split .
idx
list of indices. Repeated indices are ignored.
list of indices . Repeated indices are ignored .