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.degrees() and rad2deg() in Python
Next article icon

numpy.degrees() and rad2deg() in Python

Last Updated : 08 Mar, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report
The numpy.degrees() is a mathematical function that helps user to convert angles from radians to degrees.
Syntax : numpy.degrees(x[, out]) = ufunc 'degrees') Parameters : array : [array_like] elements are in radians. out : [ndaaray, optional] Output array of same shape as x.         2pi Radians = 360 degrees Return : An array with degree values in place of radian values.
  Code #1 : Working Python3
# Python3 program explaining # degrees() function import numpy as np import math  in_array = [0, math.pi / 2, np.pi / 3, np.pi] print ("Radian values : \n", in_array)  degree_Values = np.degrees(in_array) print ("\nDegree values : \n", degree_Values) 
Output :
  Radian values :    [0, 1.5707963267948966, 1.0471975511965976, 3.141592653589793]    Degree values :    [   0.   90.   60.  180.]  
  numpy.rad2deg(x[, out]) = ufunc 'rad2deg') : This mathematical function helps user to convert angles from radians to degrees.
Parameters : array : [array_like] elements are in radians. out : [ndaaray, optional]Output array of same shape as x.         2pi Radians = 36o degrees Return : Corresponding angles in degree.
  Code #2 : rad2deg() Equivalent to degree() Python3
# Python3 program explaining # rad2deg() function  import numpy as np import math  in_array = [0, math.pi / 2, np.pi / 3, np.pi] print ("Radian values : \n", in_array)  out_Values = np.rad2deg(in_array) print ("\nDegree values : \n", out_Values) 
Output :
  Radian values :    [0, 1.5707963267948966, 1.0471975511965976, 3.141592653589793]    Degree values :    [   0.   90.   60.  180.]  
 

Next Article
numpy.degrees() and rad2deg() in Python

M

mohit gupta_omg :)
Improve
Article Tags :
  • Python
  • Python-numpy
  • Python numpy-Mathematical Function
Practice Tags :
  • python

Similar Reads

    numpy.radians() and deg2rad() in Python
    The numpy.radians() is a mathematical function that helps user to convert angles from degree to radians. Syntax : numpy.radians(x[, out]) = ufunc 'radians') Parameters : array : [array_like] elements are in degrees. out : [ndaaray, optional]Output array of same shape as x. 2pi Radians = 36o degrees
    2 min read
    degrees() and radians() in Python
    In geometry and trigonometry, we often switch between degrees and radians. Python’s math module provides two simple functions to handle these conversions:math.radians() – Converts degrees to radiansmath.degrees() – Converts radians to degreesLet’s explore both with examples:math.radians()This functi
    2 min read
    numpy.angle() in Python
    numpy.angle() function is used when we want to compute the angle of the complex argument. A complex number is represented by “ x + yi " where x and y are real number and i= (-1)^1/2. The angle is calculated by the formula tan-1(x/y). Syntax : numpy.angle(z, deg=0) Parameters : z : [array_like] A com
    2 min read
    turtle.degrees() function in Python
    The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.degrees() This method is used to set angle measurement units to degrees. By
    1 min read
    numpy.cos() in Python
    numpy.cos(x[, out]) = ufunc 'cos') : This mathematical function helps user to calculate trigonometric cosine for all x(being the array elements). Parameters : array : [array_like]elements are in radians. 2pi Radians = 360 degrees Return : An array with trigonometric cosine of x for all x i.e. array
    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