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