dask 2021.10.0

ParametersReturns
swapaxes(a, axis1, axis2)

This docstring was copied from numpy.swapaxes.

Some inconsistencies with the Dask version may exist.

Parameters

a : array_like

Input array.

axis1 : int

First axis.

axis2 : int

Second axis.

Returns

a_swapped : ndarray

For NumPy >= 1.10.0, if a is an ndarray, then a view of a is returned; otherwise a new array is created. For earlier NumPy versions a view of a is returned only if the order of the axes is changed, otherwise the input array is returned.

Interchange two axes of an array.

Examples

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

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/routines.py#155
type: <class 'function'>
Commit: