VOOZH about

URL: https://www.geeksforgeeks.org/python/numpy-real-function-python/

⇱ numpy.real() function - Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

numpy.real() function - Python

Last Updated : 11 Jun, 2020
numpy.real() function return the real part of the complex argument.
Syntax : numpy.real(arr) Parameters : arr : [array_like] Input array. Return : [ndarray or scalar] The real component of the complex argument. If val is real, the type of val is used for the output. If val has complex elements, the returned type is float.
Code #1 : Output :
[1. 5. 9.]
  Code #2 :
Output :
[2. 5. 8.]
Comment
Article Tags:
Article Tags: