mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-14 17:12:49 +08:00
Adds round op and primitive (#203)
This commit is contained in:
committed by
GitHub
parent
477397bc98
commit
4d4af12c6f
@@ -1148,5 +1148,15 @@ void init_array(py::module_& m) {
|
||||
"reverse"_a = false,
|
||||
"inclusive"_a = true,
|
||||
"stream"_a = none,
|
||||
"See :func:`cummin`.");
|
||||
"See :func:`cummin`.")
|
||||
.def(
|
||||
"round",
|
||||
[](const array& a, int decimals, StreamOrDevice s) {
|
||||
return round(a, decimals, s);
|
||||
},
|
||||
py::pos_only(),
|
||||
"decimals"_a = 0,
|
||||
py::kw_only(),
|
||||
"stream"_a = none,
|
||||
"See :func:`round`.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user