moveaxis(a, source, destination)
Other axes remain in their original order.
The array whose axes should be reordered.
Original positions of the axes to move. These must be unique.
Destination positions for each of the original axes. These must also be unique.
Array with moved axes. This array is a view of the input array.
Move axes of an array to new positions.
swapaxes
Interchange two axes of an array.
transpose
Permute the dimensions of an array.
>>> x = np.zeros((3, 4, 5))
... np.moveaxis(x, 0, -1).shape (4, 5, 3)
>>> np.moveaxis(x, -1, 0).shape (5, 3, 4)
These all achieve the same result:
>>> np.transpose(x).shape (5, 4, 3)
>>> np.swapaxes(x, 0, -1).shape (5, 4, 3)
>>> np.moveaxis(x, [0, 1], [-1, -2]).shape (5, 4, 3)
>>> np.moveaxis(x, [0, 1, 2], [-1, -2, -3]).shape (5, 4, 3)See :
The following pages refer to to this document either explicitly or contain code examples using this.
dask.array.numpy_compat.moveaxis
numpy.transpose
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