I try to rotate the matrix so that the first line is the last and the last is the first. And proceed in this way with the other lines in array
import numpy as np
m = np.array([[11, 12, 13, 14, 15],
[21, 22, 23, 24, 25],
[31, 32, 33, 34, 35],
[41, 42, 43, 44, 45]])
My attempt:
p = np.rot90(m, 2)
array([[45, 44, 43, 42, 41],
[35, 34, 33, 32, 31],
[25, 24, 23, 22, 21],
[15, 14, 13, 12, 11]])
I need
array([[41, 42, 43, 44, 45],
[31, 32, 33, 34, 35],
[21, 22, 23, 24, 25],
[11, 12, 13, 14, 15]])
Do you have any advice?