fields.buffers.utilities.buffer_ones_like#

fields.buffers.utilities.buffer_ones_like(other: BufferBase, *args, **kwargs) BufferBase[source]#

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

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

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

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

Returns:

A one-initialized buffer with the same shape as other.

Return type:

BufferBase