mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-14 17:12:49 +08:00
make python array SupportsAbs conform (like numpy) (#624)
This commit is contained in:
@@ -1110,6 +1110,7 @@ void init_array(py::module_& m) {
|
||||
py::kw_only(),
|
||||
"stream"_a = none,
|
||||
"See :func:`abs`.")
|
||||
.def("__abs__", &mlx::core::abs, "See :func:`abs`.")
|
||||
.def(
|
||||
"square",
|
||||
&square,
|
||||
|
||||
Reference in New Issue
Block a user