The numpy.flipud() function flips the array(entries in each column) in up-down direction, shape preserved. Syntax:
array : [array_like]Input array, we want to flip
Flipped array in up-down direction.
numpy as geek
"Original array : \n"
"\nFlipped array : \n"
Original array :
Flipped array :
Note : These codes won’t run on online IDE’s. So please, run them on your systems to explore the working.
This article is contributed by Mohit Gupta_OMG 😀. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.