def dict2array(d):
    """
    Merges a dict of lists into a list of lists with the same order.

    Parameters
    ----------
    d : dict.

    Returns
    -------
    output : list.
        list of lists.
    order : list.
        keys from dict in order of listing.
    """
    output = []
    order = []
    for u in d:
        output.append(list(d[u]))
        order.append(u)
    return output, order
