import h5py


def read_data(fname):
    """Read the input h5 file into a python dictionary with one key per column of data.

    Parameters
    ----------
    fname : string

    Returns
    -------
    data : dict

    """
    data = dict()
    with h5py.File(fname, "r") as hdf:
        for key in hdf.keys():
            data[key] = hdf[key][...]
    return data
