mlx.core.take#
- take(a: array, /, indices: int | array, axis: int | None = None, *, stream: None | Stream | Device = None) array#
Take elements along an axis.
The elements are taken from
indicesalong the specified axis. If the axis is not specified the array is treated as a flattened 1-D array prior to performing the take.As an example, if the
axis=1this is equivalent toa[:, indices, ...].