将三维矩阵转为二维矩阵
矩阵降维-将矩阵按照某列进行排序
from numpy import *
a = mat([[1,34,3],[2,3,41],[2,34,41],[2,53,41]])
print(a)
srtInd=a[:,1].argsort(0)
print(srtInd)
print(a[srtInd])
print("====")
print(a[srtInd][:,0,:])
'''
[[ 1 34 3]
[ 2 3 41]
[ 2 34 41]
[ 2 53 41]]
[[1]
[0]
[2]
[3]]
[[[ 2 3 41]]
[[ 1 34 3]]
[[ 2 34 41]]
[[ 2 53 41]]]
====
[[ 2 3 41]
[ 1 34 3]
[ 2 34 41]
[ 2 53 41]]
'''