ssapy_toolkit.IO.hdf5_utils

Functions

append_h5(filename, key, append_data)

Append rows along axis 0.

combine_h5(filename, files[, verbose, overwrite])

Merge datasets from multiple HDF5 files into filename without clobbering existing keys.

h5_key_exists(filename, key)

True if key exists anywhere in the file (supports nested paths like 'a/b/c').

h5_keys(file_path)

List full dataset paths in an HDF5 file.

h5_root_keys(file_path)

List top-level members.

overwrite_h5(filename, key, new_data)

Overwrite (or create) dataset at key.

read_h5(filename, key)

Load data from an HDF5 file.

read_h5_all(file_path)

Flatten all datasets into a dict keyed by their full HDF5 paths.

read_h5_to_dict(file_path)

save_h5(filename, key, data)

Create a dataset at key.

ssapy_toolkit.IO.hdf5_utils.append_h5(filename: str, key: str, append_data) None[source]

Append rows along axis 0. If dataset doesn’t exist, create it. Note: append_data must be broadcastable to the dataset shape except on axis 0.

ssapy_toolkit.IO.hdf5_utils.combine_h5(filename: str, files: list, verbose: bool = False, overwrite: bool = False) None[source]

Merge datasets from multiple HDF5 files into filename without clobbering existing keys.

ssapy_toolkit.IO.hdf5_utils.h5_key_exists(filename: str, key: str) bool[source]

True if key exists anywhere in the file (supports nested paths like ‘a/b/c’).

ssapy_toolkit.IO.hdf5_utils.h5_keys(file_path: str) list[source]

List full dataset paths in an HDF5 file.

ssapy_toolkit.IO.hdf5_utils.h5_root_keys(file_path: str) list[source]

List top-level members.

ssapy_toolkit.IO.hdf5_utils.overwrite_h5(filename: str, key: str, new_data) None[source]

Overwrite (or create) dataset at key.

ssapy_toolkit.IO.hdf5_utils.read_h5(filename: str, key: str)[source]

Load data from an HDF5 file. Returns np.ndarray (or scalar) or None if missing.

ssapy_toolkit.IO.hdf5_utils.read_h5_all(file_path: str) dict[source]

Flatten all datasets into a dict keyed by their full HDF5 paths.

ssapy_toolkit.IO.hdf5_utils.read_h5_to_dict(file_path: str) dict[source]
ssapy_toolkit.IO.hdf5_utils.save_h5(filename: str, key: str, data) None[source]

Create a dataset at key. Creates parent groups if needed. Fails if dataset exists.