def merge(df_w_subset, *dfs):
    """Take dataframes containing relevant values (e.g. lat/lons, y, X matrices) and
    return numpy arrays that are properly sorted to the index of the first input
    dataframe.

    Parameters
    ----------
    df_w_subset : :class:`pandas.DataFrame`
        The dataframe with the index that we are going to reindex all other dataframes
        to before converting to numpy array
    *dfs : :class:`pandas.DataFrame`
        The other dataframes that will be sorted and returned as arrays

    Returns
    -------
    list of :class:`numpy.ndarray`
        The consistently sorted arrays, in the same order as the input DataFrames.
    """
    return [df_w_subset.values] + [d.reindex(df_w_subset.index).values for d in dfs]