This commit is contained in:
Awni Hannun 2024-02-04 16:18:03 -08:00 committed by GitHub
parent ebfd3618b0
commit 5c3ac52dd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,