def h5file_2_name(path_h5file):
    """ Given a path to an HDF file, obtains the file name (without format
    extension).

    :param path_h5file: Path to an HDF file.
    :type path_h5file: str
    :return: Name of file
    :rtype: str
    |
    :Example:
        >>> from pyphoon.utils import h5file_2_name
        >>> h5file_2_name("path/to/filename.h5")
        'filename'
    """
    return path_h5file.split('/')[-1].split('.h5')[0]
