Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Numpy exercise
  • pandas
  • Matplotlib
  • Data visulisation
  • EDA
  • Machin Learning
  • Deep Learning
  • NLP
  • Data science
  • ML Tutorial
  • Computer Vision
  • ML project
Open In App
Next Article:
numpy.fliplr() in Python
Next article icon

numpy.fliplr() in Python

Last Updated : 08 Mar, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report
numpy.fliplr(array) : Flip array(entries in each column) in left-right direction, shape preserved Parameters :
  array : [array_like]Input array, we want to flip  
Return :
  Flipped array in left-right direction.  
Python
# Python Program illustrating # numpy.fliplr() method  import numpy as geek  array = geek.arange(8).reshape((2,2,2)) print("Original array : \n", array)  # fliplr : means flip left-right print("\nFlipped array left-right : \n", geek.fliplr(array)) 
Output :
  Original array :    [[[0 1]    [2 3]]     [[4 5]    [6 7]]]    Flipped array left-right :    [[[2 3]    [0 1]]     [[6 7]    [4 5]]]  
Note : These codes won’t run on online IDE's. Please run them on your systems to explore the working.

Next Article
numpy.fliplr() in Python

M

Mohit Gupta
Improve
Article Tags :
  • Misc
  • Python
  • Python-numpy
  • Python numpy-arrayManipulation
Practice Tags :
  • Misc
  • python

Similar Reads

    numpy.flip() in Python
    The numpy.flip() function reverses the order of array elements along the specified axis, preserving the shape of the array.  Syntax: numpy.flip(array, axis) Parameters :  array : [array_like]Array to be input axis : [integer]axis along which array is reversed. Returns :  reversed array with shape pr
    1 min read
    numpy.flipud() in Python
    The numpy.flipud() function flips the array(entries in each column) in up-down direction, shape preserved. Syntax:  numpy.flipud(array) Parameters :  array : [array_like]Input array, we want to flip Return :  Flipped array in up-down direction.Python # Python Program illustrating # numpy.flipud() me
    1 min read
    numpy.invert() in Python
    numpy.invert() is a bitwise function in NumPy used to invert each bit of an integer array. It performs a bitwise NOT operation, flipping 0s to 1s and 1s to 0s in the binary representation of integers. Example:Pythonimport numpy as np a = np.array([1, 2, 3]) res = np.invert(a) print(res)Output[-2 -3
    2 min read
    numpy.binary_repr() in Python
    numpy.binary_repr(number, width=None) function is used to represent binary form of the input number as a string. For negative numbers, if width is not given, a minus sign is added to the front. If width is given, the two’s complement of the number is returned, with respect to that width. In a two’s-
    3 min read
    numpy.rot90() in Python
    The numpy.rot90() method performs rotation of an array by 90 degrees in the plane specified by axis(0 or 1). Syntax: numpy.rot90(array, k = 1, axes = (0, 1)) Parameters : array : [array_like]i.e. array having two or more dimensions. k : [optional , int]No. of times we wish to rotate array by 90 degr
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences