fields.buffers.core.ArrayBuffer.full_like#

classmethod ArrayBuffer.full_like(other: BufferBase, fill_value: Any = 0.0, *args, **kwargs) BufferBase#

Create a new buffer filled with a constant value and matching the shape of another buffer.

This method delegates to the class’s full constructor, using the shape of the provided buffer instance.

Parameters:
  • other (BufferBase) – The buffer whose shape will be used.

  • fill_value (scalar or quantity, default 0.0) – The constant value to fill the buffer with.

  • *args – Additional positional arguments forwarded to full.

  • **kwargs – Additional keyword arguments forwarded to full. Common options include: - dtype : data type of the buffer - units : physical units (for unit-aware buffers)

Returns:

A buffer filled with the specified value and the same shape as other.

Return type:

BufferBase