March 2003
Intermediate to advanced
656 pages
39h 30m
English
swapaxes
swapaxes(a,axis1,axis2)
Returns an array s with the same type
code, rank, and size as a, sharing
a’s data.
s’s shape is the same as
a, but with the lengths of axes
axis1 and axis2
swapped. In other words,
s
=swapaxes(
a,axis1,axis2
)
is like:
swapped_shape=range(length(a.shape))swapped_shape[axis1]=axis2swapped_shape[axis2]=axis1s=transpose(a,swapped_shape)
Read now
Unlock full access