dask 2021.10.0

ParametersReturnsBackRef
moveaxis(a, source, destination)

This docstring was copied from numpy.moveaxis.

Some inconsistencies with the Dask version may exist.

Other axes remain in their original order.

versionadded

Parameters

a : np.ndarray

The array whose axes should be reordered.

source : int or sequence of int

Original positions of the axes to move. These must be unique.

destination : int or sequence of int

Destination positions for each of the original axes. These must also be unique.

Returns

result : np.ndarray

Array with moved axes. This array is a view of the input array.

Move axes of an array to new positions.

See Also

swapaxes

Interchange two axes of an array.

transpose

Permute the dimensions of an array.

Examples

This example is valid syntax, but we were not able to check execution
>>> x = np.zeros((3, 4, 5))  # doctest: +SKIP
... np.moveaxis(x, 0, -1).shape # doctest: +SKIP (4, 5, 3)
This example is valid syntax, but we were not able to check execution
>>> np.moveaxis(x, -1, 0).shape  # doctest: +SKIP
(5, 3, 4)

These all achieve the same result:

This example is valid syntax, but we were not able to check execution
>>> np.transpose(x).shape  # doctest: +SKIP
(5, 4, 3)
This example is valid syntax, but we were not able to check execution
>>> np.swapaxes(x, 0, -1).shape  # doctest: +SKIP
(5, 4, 3)
This example is valid syntax, but we were not able to check execution
>>> np.moveaxis(x, [0, 1], [-1, -2]).shape  # doctest: +SKIP
(5, 4, 3)
This example is valid syntax, but we were not able to check execution
>>> np.moveaxis(x, [0, 1, 2], [-1, -2, -3]).shape  # doctest: +SKIP
(5, 4, 3)
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.array.routines.transpose

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/numpy_compat.py#132
type: <class 'function'>
Commit: