numpy reshape order

1
2
3
4
5
6
import numpy as np

a = np.arange(6).reshape((3,2))
print("a:", a)
print(np.reshape(a, (2,3)))
print(np.reshape(a, (2,3), order='F'))
1
2
3
4
5
6
7
a: [[0 1]
[2 3]
[4 5]]
[[0 1 2]
[3 4 5]]
[[0 4 3]
[2 1 5]]
请作者喝一杯咖啡☕️