mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-14 09:07:12 +08:00
Add move and swap axis, and vmap for slice, concat, and gather (#158)
* add move and swap axis, and vmap for slice, concat, and gather
This commit is contained in:
@@ -862,6 +862,22 @@ void init_array(py::module_& m) {
|
||||
py::kw_only(),
|
||||
"stream"_a = none,
|
||||
"See :func:`any`.")
|
||||
.def(
|
||||
"moveaxis",
|
||||
&moveaxis,
|
||||
"source"_a,
|
||||
"destination"_a,
|
||||
py::kw_only(),
|
||||
"stream"_a = none,
|
||||
"See :func:`moveaxis`.")
|
||||
.def(
|
||||
"swapaxes",
|
||||
&swapaxes,
|
||||
"axis1"_a,
|
||||
"axis2"_a,
|
||||
py::kw_only(),
|
||||
"stream"_a = none,
|
||||
"See :func:`moveaxis`.")
|
||||
.def(
|
||||
"transpose",
|
||||
[](const array& a, py::args axes, StreamOrDevice s) {
|
||||
|
||||
Reference in New Issue
Block a user