def vector_to_probs(vec, counts):
    """ Return dict of probabilities.

    Parameters:
        vec (ndarray): 1d vector of probabilites.
        counts (dict): Dict of counts

    Returns:
        dict: dict of probabilities
    """
    out_counts = {}
    idx = 0
    for key in counts:
        out_counts[key] = vec[idx]
        idx += 1
    return out_counts