numpy.rot90()

numpy.rot90

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

Rotate an array by 90 degrees in the counter-clockwise direction.

The first two dimensions are rotated; therefore, the array must be at least 2-D.

Parameters:

m : array_like

Array of two or more dimensions.

k : integer

Number of times the array is rotated by 90 degrees.

Returns:

登录查看完整内容