Numpy image - rotate matrix 270 degrees Numpy image - rotate matrix 270 degrees python python

Numpy image - rotate matrix 270 degrees


You can tell rot90 to rotate several times, this should work:

rotated = numpy.rot90(orignumpyarray,3)


rotated_array =numpy.rot90(orignumpyarray,3)

Explanation of the function:

numpy.rot90(a,b)
a = Array which you want to rotate
b = How many times you want to rotate it by 90 degrees. For here you want 270° so 90° * 3 = 270° that is why b = 3 here.