fields.buffers.core.ArrayBuffer.empty_like#
- classmethod ArrayBuffer.empty_like(other: BufferBase, *args, **kwargs) BufferBase #
Create a new buffer allocation matching the shape of another buffer.
This method delegates to the class’s empty constructor, using the shape of the provided buffer instance.
- Parameters:
other (
BufferBase
) – The buffer whose shape will be used.*args – Additional positional arguments forwarded to empty.
**kwargs – Additional keyword arguments forwarded to empty. Common options include: - dtype : data type of the buffer - units : physical units (for unit-aware buffers)
- Returns:
An unallocated buffer like other.
- Return type:
BufferBase