def load_h5(h5f):
    """
    Load fiberbundles configurations from a hdf5 class

    Parameters
    ----------
    h5f : hdf5 class
        h5-file or group object

    Returns
    -------
    res : list(list(fiber)), fibers are (n,4)-arrays with (x,y,z,radii) for each fiber point
    """

    fiber_bundles = []
    fb_list = list(map(int, list(h5f.keys())))
    fb_list.sort()
    for fb in fb_list:
        fiber_bundles.append([])
        f_list = list(map(int, list(h5f[str(fb)].keys())))
        f_list.sort()
        for f in f_list:
            fiber_bundles[-1].append(h5f[str(fb)][str(f)][:].astype(float))

    return fiber_bundles