fields.buffers.core.HDF5Buffer.full#
- classmethod HDF5Buffer.full(shape: ~typing.Tuple[int, ...], *args, fill_value: ~typing.Any = 0.0, dtype: ~typing.Any = <class 'float'>, **kwargs) HDF5Buffer [source]#
Create an HDF5-backed buffer filled with a constant value or quantity.
- Parameters:
fill_value (
scalar
,array-like
, orunyt_quantity
, default0.0
) – Value to initialize the dataset with. Can be: - A plain scalar (e.g., 3.14) - A NumPy array or similar array-like object - Aunyt_quantity
with unitsdtype (
data-type
, defaultfloat
) – 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 constant-filled HDF5 dataset.
- Return type: