Skip to content

Commit eec6188

Browse files
committed
docs: add multi-axis roll examples to documentation
1 parent 4640852 commit eec6188

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/source/numpy.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ not modify the underlying xexpression.
291291
- :cpp:func:`xt::rot90\<2\>(a, {1, 2}) <xt::rot90>`
292292
* - :any:`np.roll(a, 2, axis=1) <numpy.roll>`
293293
- :cpp:func:`xt::roll(a, 2, 1) <xt::roll>`
294+
* - :any:`np.roll(a, (1, 2), axis=(0, 1)) <numpy.roll>`
295+
- :cpp:func:`xt::roll(a, {1, 2}, {0, 1}) <xt::roll>`
294296

295297
Iteration
296298
---------

docs/source/quickref/manipulation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ roll
6666
xt::xarray<int> a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
6767
auto t0 = xt::roll(a, 2);
6868
auto t1 = xt::roll(a, 2, 1);
69+
auto t2 = xt::roll(a, {1, 2}, {0, 1});
6970
7071
rot90
7172
-----

0 commit comments

Comments
 (0)