From 5c3ac52dd7a78015f93346823edd31dd8fed2246 Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Sun, 4 Feb 2024 16:18:03 -0800 Subject: [PATCH] fix test (#627) --- python/src/array.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/src/array.cpp b/python/src/array.cpp index ddf27e68f..4395d50e6 100644 --- a/python/src/array.cpp +++ b/python/src/array.cpp @@ -1110,7 +1110,8 @@ void init_array(py::module_& m) { py::kw_only(), "stream"_a = none, "See :func:`abs`.") - .def("__abs__", &mlx::core::abs, "See :func:`abs`.") + .def( + "__abs__", [](const array& a) { return abs(a); }, "See :func:`abs`.") .def( "square", &square,