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

Method operator*

mlx/array.cpp:345–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345array::ArrayIterator::reference array::ArrayIterator::operator*() const {
346 auto start = Shape(arr.ndim(), 0);
347 auto end = arr.shape();
348 auto shape = arr.shape();
349 shape.erase(shape.begin());
350 start[0] = idx;
351 end[0] = idx + 1;
352 return reshape(slice(arr, start, end), shape);
353};
354
355} // namespace mlx::core

Callers

nothing calls this directly

Calls 4

reshapeFunction · 0.70
sliceFunction · 0.70
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected