fields.buffers.utilities.buffer_full_like#

fields.buffers.utilities.buffer_full_like(other: BufferBase, fill_value: Any = 0.0, *args, **kwargs) BufferBase[source]#

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

Parameters:
  • other (BufferBase) – The buffer whose shape is used for the new one.

  • fill_value (Any, default 0.0) – The value to fill the buffer with.

  • *args – Additional arguments forwarded to the buffer constructor.

  • **kwargs – Additional arguments forwarded to the buffer constructor.

Returns:

A buffer filled with fill_value and the same shape as other.

Return type:

BufferBase