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

Function structure_sentinel

python/src/trees.cpp:264–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264nb::object structure_sentinel() {
265 static nb::object sentinel;
266
267 if (sentinel.ptr() == nullptr) {
268 sentinel = nb::capsule(&sentinel);
269 // probably not needed but this should make certain that we won't ever
270 // delete the sentinel
271 sentinel.inc_ref();
272 }
273
274 return sentinel;
275}
276
277std::pair<std::vector<mx::array>, nb::object> tree_flatten_with_structure(
278 nb::object tree,

Callers 2

Calls 1

ptrMethod · 0.80

Tested by

no test coverage detected