Rotate an array by 90 degrees in the counter-clockwise direction. The first two dimensions are rotated if the array has more than 2 dimensions.
Parameters: |
|
---|---|
Returns: | (array_like) Rotated array. |
Examples:
>>> m = array([[1,2],[3,4]])
>>> m
>>> array([[1, 2]
[3, 4]])
>>> rot90(m)
array([[2, 4]
[1, 3]])
>>> rot90(m, 2)
array([[4, 3]
[2, 1]])