MCPcopy Create free account
hub / github.com/ml-explore/mlx / mlx_maximum_item

Function mlx_maximum_item

python/src/indexing.cpp:1051–1067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1049}
1050
1051mx::array mlx_maximum_item(
1052 const mx::array& src,
1053 const nb::object& obj,
1054 const ScalarOrArray& v) {
1055 auto [update, starts, stops, strides] =
1056 mlx_compute_slice_update_args(src, obj, v);
1057 if (update) {
1058 return slice_update_max(src, *update, starts, stops, strides);
1059 }
1060
1061 auto [indices, updates, axes] = mlx_compute_scatter_args(src, obj, v);
1062 if (indices.size() > 0) {
1063 return scatter_max(src, indices, updates, axes);
1064 } else {
1065 return maximum(src, updates);
1066 }
1067}
1068
1069mx::array mlx_minimum_item(
1070 const mx::array& src,

Callers 1

maximumMethod · 0.85

Calls 6

slice_update_maxFunction · 0.85
mlx_compute_scatter_argsFunction · 0.85
maximumFunction · 0.85
scatter_maxFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected