fields.buffers.base.BufferBase.zeros_like#
- classmethod BufferBase.zeros_like(other: BufferBase, *args, **kwargs) BufferBase [source]#
Create a new buffer filled with zeros and matching the shape of another buffer.
This method delegates to the class’s zeros 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 zeros.
**kwargs – Additional keyword arguments forwarded to zeros. Common options include: - dtype : data type of the buffer - units : physical units (for unit-aware buffers)
- Returns:
A buffer filled with zeros and the same shape as other.
- Return type: