fields.buffers.core.UnytArrayBuffer.ones#

classmethod UnytArrayBuffer.ones(shape, *args, units: str = '', **kwargs) UnytArrayBuffer[source]#

Create a buffer filled with ones and optional units.

Parameters:
  • shape (tuple of int) – Shape of the array to create.

  • units (str, optional) – Units to assign to the buffer.

  • *args – Additional positional arguments forwarded to numpy.ones().

  • **kwargs – Keyword arguments forwarded to numpy.ones().

Returns:

A one-filled, unit-tagged buffer.

Return type:

UnytArrayBuffer