Skip to content

daft.functions.hdf5_keys#

hdf5_keys #

hdf5_keys(file_expr: Expression, group: str = '/') -> Expression

List member names directly under an HDF5 group.

Expression wrapper for Hdf5File.keys(), mirroring h5py Group.keys() while returning a concrete list of strings.

Parameters:

Name Type Description Default
file_expr Expression

Hdf5File expression.

required
group str

HDF5 group within the file. Defaults to the root group /.

'/'

Returns:

Type Description
Expression

Expression containing a list of child names under the group.

Source code in daft/functions/hdf5.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
def hdf5_keys(file_expr: Expression, group: str = "/") -> Expression:
    """List member names directly under an HDF5 group.

    Expression wrapper for ``Hdf5File.keys()``, mirroring h5py
    ``Group.keys()`` while returning a concrete list of strings.

    Args:
        file_expr: ``Hdf5File`` expression.
        group: HDF5 group within the file. Defaults to the root group ``/``.

    Returns:
        Expression containing a list of child names under the group.
    """
    return cast("Expression", hdf5_keys_fn(file_expr, group=group))