def filename2hdf5(filename):

    ext = os.path.splitext(filename)[1]
    if ext in ['.par', '.dat', '.txt', '.ascii']:
        return filename.replace(ext, '.hdf5')
    else:
        raise Exception("Unknown extension: %s" % ext)
dataset/ETHPy150Open hyperion-rt/hyperion/hyperion/util/functions.py/filename2hdf5/original