小编Jad*_*nik的帖子

在python中执行反转置的最佳方法是什么?

让我们说我有一个阵列

a = np.arange(16).reshape((4,4))

0   1  2   3
4   5  6   7
8   9  10  11
12  13 14  15
Run Code Online (Sandbox Code Playgroud)

但我想要

15  11  7  3
14  10  6  2
13  9   5  1
12  8   4  0
Run Code Online (Sandbox Code Playgroud)

这是翻过次要对角线的翻转,或者是一种反转置.

怎么能在numpy中做到这一点?

python transpose numpy matrix

6
推荐指数
1
解决办法
1291
查看次数

标签 统计

matrix ×1

numpy ×1

python ×1

transpose ×1