// Copyright © 2025 Apple Inc. #pragma once #include #include #include namespace nb = nanobind; using namespace nb::literals; nb::callable mlx_func(nb::object func, std::vector deps); template nb::callable mlx_func(F func, Deps&&... deps) { return mlx_func( nb::cpp_function(std::move(func)), std::vector{deps.ptr()...}); } template nb::callable mlx_func(nb::object func, Deps&&... deps) { return mlx_func(std::move(func), std::vector{deps.ptr()...}); }