fields.buffers.utilities.buffer_full#
- fields.buffers.utilities.buffer_full(shape: Sequence[int], *args, fill_value: Any = 0.0, buffer_class: Type[BufferBase] | None = None, buffer_registry: BufferRegistry | None = None, **kwargs) BufferBase [source]#
Create a new buffer filled with a constant value.
- Parameters:
fill_value (
Any
, default0.0
) – The value to fill the buffer with.*args – Positional arguments passed through to the buffer constructor.
buffer_class (
BufferBase
, optional) – Specific buffer class to use. If None, uses the default (ArrayBuffer).buffer_registry (
BufferRegistry
, optional) – Registry to resolve buffer class by type or name.**kwargs – Additional keyword arguments forwarded to the buffer constructor.
- Returns:
A constant-filled buffer instance.
- Return type: