numpy 如何交换多维数组维度顺序
python吧
全部回复
仅看楼主
level 1
ssiaw12345 楼主
就好像MATLAB中的permute那样,交换高维数组的维度顺序,在numpy中有对应的函数吗啊?
比如我现在的array的shape是[3,4,5],我想让1、2维交换下顺序,第0维不变,最后shape是[3,5,4]
2016年02月16日 06点02分 1
level 1
numpy里的transpose
2017年01月02日 03点01分 4
[真棒] [真棒] [真棒]
2018年12月19日 12点12分
level 1
numpy.transpose(x,(0,2,1))
2017年12月10日 07点12分 5
怎么才能给你个赞呢?[真棒]
2018年11月30日 03点11分
[真棒] [真棒] [真棒]
2018年12月19日 12点12分
正解。
2022年06月30日 13点06分
1