Skip to content
fn

mlx_scatter_max

::mlx::core::array mlx_scatter_max(const ::mlx::core::array & base, const int & idx, const ::mlx::core::array & upd, const int & axes)

MLX's own scatter_max / scatter_min / scatter_prod, guarded. The two extrema let a NaN through only when it wins a comparison, which a NaN never does; gpu_scatter_max / gpu_scatter_min put it back.