mlx.data.Buffer.perm

mlx.data.Buffer.perm#

Buffer.perm(self: mlx.data._c.Buffer, perm: List[int]) mlx.data._c.Buffer#

Arbitrarily reorder the buffer with the provided indices.

This operation actually performs arbitrary indexing of the buffer which means it can be used to slice or filter the buffer.

It should be renamed in the future to avoid confusion.

Parameters:

perm (list of ints) – The indices defining the permutation/selection.