fields.buffers.base.BufferBase.empty#
- abstract classmethod BufferBase.empty(shape, *args, **kwargs) BufferBase [source]#
Create a new buffer with a window into unaltered memory.
This method constructs a new backend-specific array of the given shape, and wraps it in a buffer instance.
- Parameters:
shape (
tuple
ofint
) – The desired shape of the buffer, including both grid and element dimensions.*args – Positional arguments passed through to the array constructor (backend-specific).
**kwargs –
Additional keyword arguments passed to the array constructor. May include:
dtype
: Data type of the array (e.g.,float32
,int64
)units
: Units of the array (if supported)
- Returns:
A buffer instance wrapping an uninitialized array.
- Return type: