def read_h5()

in utils/io.py [0:0]


def read_h5(path):
    """Load data from h5 file

    Arguments:
        path {str} -- file path

    Raises:
        FileNotFoundError -- Path not pointing to a file

    Returns:
        dict -- dictionary containing the data
    """

    if not os.path.isfile(path):
        raise FileNotFoundError()

    data_files = dict()
    h5_data = h5py.File(path)
    tags = list(h5_data.keys())
    for tag in tags:
        tag_data = np.asarray(h5_data[tag]).copy()
        data_files.update({tag: tag_data})
    h5_data.close()

    return data_files