def make_rosetta_dict(array, inverse=False):
    """
    convert an array to a dictonary mapping the index to the corresponding array entry.
    Use `inverse` to reverse the mapping, i.e. the array entry to the index.

    Args:
        array (array-like):
        inverse (boolean):

    Returns:
        dict: the map

    """
    if inverse:
        return {
            # '-' is an artifact from ribiosAnnotation
            gene_symbol: i
            for i, gene_symbol in enumerate(array)
            if gene_symbol != "-"
        }
    else:
        return dict(enumerate(array))