让我们说我有一个阵列
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中做到这一点?