This commit is contained in:
Awni Hannun
2024-02-04 16:18:03 -08:00
committed by GitHub
parent ebfd3618b0
commit 5c3ac52dd7

View File

@@ -1110,7 +1110,8 @@ void init_array(py::module_& m) {
py::kw_only(), py::kw_only(),
"stream"_a = none, "stream"_a = none,
"See :func:`abs`.") "See :func:`abs`.")
.def("__abs__", &mlx::core::abs, "See :func:`abs`.") .def(
"__abs__", [](const array& a) { return abs(a); }, "See :func:`abs`.")
.def( .def(
"square", "square",
&square, &square,