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

Method ArrayIterator

mlx/array.cpp:338–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338array::ArrayIterator::ArrayIterator(const array& arr, int idx)
339 : arr(arr), idx(idx) {
340 if (arr.ndim() == 0) {
341 throw std::invalid_argument("Cannot iterate over 0-d array.");
342 }
343}
344
345array::ArrayIterator::reference array::ArrayIterator::operator*() const {
346 auto start = Shape(arr.ndim(), 0);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected