It is a special transpose
Data recombinant form, can be returned without the need to view the underlying data to copy any of the contents. Array has transpose method, there are also special T attributes:
import numpy as np
arr = np.arange(15).reshape((3,5))
print(arr)
print('------------|')
arr=arr.T #把arr数组给转置了,行列互换
print(arr)
#计算矩阵内积会使用 np.dot
arr1 = np.random.randn(6,3)
print(arr1)
print('------------------')
arr2 =np.dot(arr1.T, arr1
print(arr2)
[[ 0 1 2 3 4]
[ 5 6 7 8 9]
[10 11 12 13 14]]
------------|
[[ 0 5 10]
[ 1 6 11]
[ 2 7 12]
[ 3 8 13]
[ 4 9 14]]
[[-0.10721531 -0.9623694 2.40925637]
[ 1.37846812 -1.08492064 1.52178665]
[ 2.27103816 0.05325764 0.06673496]
[-0.07155395 0.21708365 -0.7271715 ]
[-1.54946414 -0.10253511 0.54530747]
[-0.61156295 -1.6659128 -0.30243878]]
------------------
[[ 9.84925209 -0.10924581 1.38304084]
[-0.10924581 4.93894824 -3.67599176]
[ 1.38304084 -3.67599176 9.04241226]]
For an article on the axis of the array, the following Detailed have a blog.