'Converting raster() function in R to its Python equivalent

I am trying to convert an algorithm from R to Python and I am struggling with the function raster() from R that creates a RasterLayer object and I don't know what I have to do to create a similar RasterLayer object in Python.

The R code I want to convert to python is:

              raster_layer_object = flip(raster((t(front))),2)

Where front is a 2 Dimensional array (with shape (6,15))

Can someone please give me a hint on this one. Thank you a lot



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source