fields.buffers.core.HDF5Buffer.zeros#

classmethod HDF5Buffer.zeros(shape: ~typing.Tuple[int, ...], *args, dtype: ~typing.Any = <class 'float'>, **kwargs) HDF5Buffer[source]#

Create an HDF5-backed buffer filled with zeros.

Parameters:
  • shape (tuple of int) – Desired shape of the dataset.

  • dtype (data-type, default float) – Element type of the dataset.

  • *args – Additional positional arguments passed to create_dataset.

  • **kwargs

    Keyword arguments forwarded to create, such as:

    • parent : h5py.File or h5py.Group

    • dataset_name : str

    • overwrite : bool

Returns:

A buffer wrapping a zero-filled HDF5 dataset.

Return type:

HDF5Buffer