Skip to content
fn

gpu_axis_index

AxisIndex gpu_axis_index(const ::mlx::core::array & idx, int extent, NegativeIndex negative)

idx checked against an axis of extent positions. extent must be positive. An empty axis has no position to point at, so every caller answers for it without indexing (an all-fill gather, a scatter that leaves the base alone).