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

Method operator()

python/src/transforms.cpp:618–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

616 }
617
618 std::vector<mx::array> operator()(const std::vector<mx::array>& inputs) {
619 auto args = nb::cast<nb::tuple>(
620 tree_unflatten_from_structure(args_structure_, inputs));
621 auto [outputs, output_structure] =
622 tree_flatten_with_structure(fun_(*args[0], **args[1]), false);
623 if (auto s = output_structure_.lock()) {
624 *s = output_structure;
625 }
626 return outputs;
627 }
628 };
629
630 nb::object call_impl(const nb::args& args, const nb::kwargs& kwargs) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected