数组转置和轴对换
In [44]: %cpaste Pasting code; enter ‘--‘ alone on the line to stop or use Ctrl-D. :arr=np.arange(15).reshape(3,5) :-- In [45]: arr Out[45]: array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) In [46]: arr.T Out[46]: array([[ 0, 5, 10], [ 1, 6, 11], [ 2, 7, 12], [ 3, 8, 13], [ 4, 9, 14]])
原文:https://www.cnblogs.com/sggggr/p/12192015.html