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

Method check_initialized

python/src/array.cpp:36–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 return *this;
35 }
36 void check_initialized() {
37 if (!initialized_) {
38 throw std::invalid_argument(
39 "Must give indices to array.at (e.g. `x.at[0].add(4)`).");
40 }
41 }
42
43 mx::array add(const ScalarOrArray& v) {
44 check_initialized();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected