missionbio.mosaic.utils.get_indexes

missionbio.mosaic.utils.get_indexes(from_list, find_list)

Find the intersection of arrays.

Parameters
from_listlist-like

The list for which indexes are to be found.

find_listlist-like

The list containing values which are to be matched in from_list.

Returns
indexes

Returns the indexes in from_list for values that are found in find_list.

Notes

get_indexes is much faster than np.where(np.isin(from_list, find_list)), but it uses more memory since it duplicates the data.