Note
Numpy (18) 본문
728x90
How to reverse the rows of a 2D array?
# Input
arr = np.arange(9).reshape(3,3)
# Solution
arr[::-1]
# output
array([[6, 7, 8],
[3, 4, 5],
[0, 1, 2]])
'Numpy' 카테고리의 다른 글
Numpy (20) (0) | 2022.08.11 |
---|---|
Numpy (19) (0) | 2022.08.10 |
Numpy (17) (0) | 2022.08.08 |
Numpy (16) (0) | 2022.08.07 |
Numpy (15) (0) | 2022.08.06 |
Comments