fields.buffers.base.BufferBase.transpose#

BufferBase.transpose(axes=None, *args, **kwargs) BufferBase[source]#

Return this buffer with axes transposed. See numpy.transpose().

Parameters:
  • axes (tuple or list of ints, optional) – If specified, it must be a tuple or list which contains a permutation of [0, 1, …, N-1] where N is the number of axes of self. Negative indices can also be used to specify axes. The i-th axis of the returned array will correspond to the axis numbered axes[i] of the input. If not specified, defaults to range(self.ndim)[::-1], which reverses the order of the axes.

  • *args – Additional positional arguments forwarded to from_array.

  • **kwargs – Additional keyword arguments forwarded to from_array.

Returns:

A new transposed buffer.

Return type:

BufferBase