nums.numpy.transpose#

nums.numpy.transpose(a: nums.core.array.blockarray.BlockArray, axes=None)#

Reverse or permute the axes of an array; returns the modified array.

This docstring was copied from numpy.transpose.

Some inconsistencies with the NumS version may exist.

For an array a with two axes, transpose(a) gives the matrix transpose.

aBlockArray

Input array.

pBlockArray

a with its axes permuted. A view is returned whenever possible.

Transposing a 1-D array returns an unchanged view of the original array.

axes not supported.

The doctests shown below are copied from NumPy. They won’t show the correct result until you operate get().

>>> x = nps.arange(4).reshape((2,2))  
>>> x.get()  
array([[0, 1],
       [2, 3]])
>>> nps.transpose(x).get()  
array([[0, 2],
       [1, 3]])