numpy.rot90()

numpy.rot90

numpy.rot90(m, k=1, axes=(0, 1)) [source]

Rotate an array by 90 degrees in the plane specified by axes.

Rotation direction is from the first towards the second axis.

New in version 1.12.0.

Parameters:

m : array_like

Array of two or more dimensions.

k : integer

Number of times the array is rotated by 90 degrees.

axes: (2