Skip to content

Instantly share code, notes, and snippets.

@kglspl
kglspl / h5fsutil.py
Created January 8, 2024 17:54
Easier interface to h5py datasets
import h5py
# Copyright (c) 2023 kglspl
# MIT License (the same as: https://github.com/kglspl/ppmparser/blob/master/LICENSE)
class H5FS(object):
def __init__(self, filename, mode):
self.filename = filename
self.f = h5py.File(filename, mode)
self.dset = None