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

Method checkdim

mlx/data/Array.cpp:200–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198Array::~Array() {}
199
200int Array::checkdim(int dim) const {
201 if (dim < 0) {
202 dim = ndim() + dim;
203 }
204 if (dim < ndim()) {
205 return dim;
206 } else {
207 throw std::runtime_error("Array: out of bound dimension");
208 }
209}
210
211namespace array {
212

Callers 7

batchFunction · 0.80
uniqFunction · 0.80
removeFunction · 0.80
apply_keyMethod · 0.80
apply_keyMethod · 0.80
applyMethod · 0.80
nextMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected