@@ -463,12 +463,13 @@ def _unstack_dispatcher(x, *, axis=None):
463
463
@array_function_dispatch (_unstack_dispatcher )
464
464
def unstack (x , / , * , axis = 0 ):
465
465
"""
466
- Splits an array into a sequence of arrays along the given axis.
466
+ Split an array into a sequence of arrays along the given axis.
467
467
468
- The ``axis`` parameter specifies the axis along which the array will be
469
- split. of the new axis in the dimensions of the result. For example, if
470
- ``axis=0`` it will be the first dimension and if ``axis=-1`` it will be
471
- the last dimension. The result is a tuple of arrays split along ``axis``.
468
+ The ``axis`` parameter specifies the dimension along which the array will
469
+ be split. For example, if ``axis=0`` (the default) it will be the first
470
+ dimension and if ``axis=-1`` it will be the last dimension.
471
+
472
+ The result is a tuple of arrays split along ``axis``.
472
473
473
474
.. versionadded:: 2.1.0
474
475
@@ -494,7 +495,7 @@ def unstack(x, /, *, axis=0):
494
495
``unstack`` serves as the reverse operation of :py:func:`stack`, i.e.,
495
496
``stack(unstack(x, axis=axis), axis=axis) == x``.
496
497
497
- This function is equivalent to tuple(np.moveaxis(x, axis, 0)), since
498
+ This function is equivalent to `` tuple(np.moveaxis(x, axis, 0))`` , since
498
499
iterating on an array iterates along the first axis.
499
500
500
501
Examples
0 commit comments