Mathematically, there is no difference between these two functions. Both compute the phase or argument of a complex number as:

arg = arctan2(zimag, zreal)

See documentation for cmath.phase and source code for numpy.angle. From software point of view, as @Julien mentioned in his comment, cmath.phase() will not work on numpy.ndarray.

Answer from AGN Gazer on Stack Overflow
๐ŸŒ
AskPython
askpython.com โ€บ home โ€บ python complex numbers
Python Complex Numbers - AskPython
August 6, 2022 - The angle between the vector and the real axis is defined as the argument or phase of a Complex Number. ... In Python, we can get the phase of a Complex Number using the cmath module for complex numbers.
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ cmath.html
cmath โ€” Mathematical functions for complex numbers
The functions in this module accept integers, floating-point numbers or complex numbers as arguments. They will also accept any Python object that has either a __complex__() or a __float__() method: these methods are used to convert the object to a complex or floating-point number, respectively, and the function is then applied to the result of the conversion.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ complex-numbers-in-python-set-1-introduction
Complex Numbers in Python | Set 1 (Introduction) - GeeksforGeeks
August 21, 2024 - Explanation: Phase of complex number Geometrically, the phase of a complex number is the angle between the positive real axis and the vector representing a complex number. This is also known as the argument of a complex number.
๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python
Complex Numbers in Python | note.nkmk.me
August 10, 2023 - To define a complex value with an imaginary part of 0, write 0 explicitly. You can also perform operations between complex, int, and float types, as detailed below. ... You can specify the real and imaginary parts as float values. Exponential notation is also allowed. ... You can also create complex numbers using the constructor, complex(), which takes the real and imaginary parts as arguments. Built-in Functions - complex() โ€” Python ...
๐ŸŒ
Luis Llamas
luisllamas.es โ€บ inicio โ€บ cursos โ€บ curso python
Complex Numbers in Python
November 20, 2024 - Python also provides functions and methods for working with complex numbers, such as the conjugate (conjugate()), magnitude (abs()), and argument (phase()): # Conjugate number = 3 + 4j conjugate = number.conjugate() print(conjugate) # Output: (3-4j) # Magnitude magnitude = abs(number) print(magnitude) # Output: 5.0 (square root of 3^2 + 4^2) # Argument (phase) argument = cmath.phase(number) print(argument) # Output: 0.9272952180016122 (in radians)
๐ŸŒ
Real Python
realpython.com โ€บ python-complex-numbers
Simplify Complex Numbers With Python โ€“ Real Python
October 21, 2023 - Things get seemingly more bizarre when you supply the complex() factory function with complex numbers as arguments. If you provide only the first argument, though, itโ€™ll behave like a proxy as before: ... However, when two arguments are present and at least one of them is a complex number, youโ€™ll get results that may be difficult to explain at first sight:
๐ŸŒ
Aleksandar Haber
aleksandarhaber.com โ€บ complex-numbers-in-python-define-perform-basic-operations-and-convert
Complex Numbers in Python โ€“ Define, Perform Basic Operations, and Convert Polar Form to Rectangular and Vice-Versa โ€“ Fusion of Engineering, Control, Coding, Machine Learning, and Science
October 30, 2023 - That is, just write . Then, we can also use the built-in Python function โ€œcomplex()โ€ to define complex numbers in Python. The first argument of the complex() Python function is the real part and the second argument is the imaginary part of the complex number.
Find elsewhere
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ return-the-angle-of-the-complex-argument-in-python
Return the angle of the complex argument in Python
February 28, 2022 - To return the angle of the complex argument, use the numpy.angle() method in Python. The method returns the counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64. ... import numpy as np # Create an array of complex numbers arr = np.array([1.0, 1.0j, 1+1j]) print("Array...") print(arr) print("\nAngles in radians:") print(np.angle(arr))
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ reference โ€บ generated โ€บ numpy.angle.html
numpy.angle โ€” NumPy v2.4 Manual
This function passes the imaginary and real parts of the argument to arctan2 to compute the result; consequently, it follows the convention of arctan2 when the magnitude of the argument is zero. See example. ... Try it in your browser! >>> import numpy as np >>> np.angle([1.0, 1.0j, 1+1j]) # in radians array([ 0. , 1.57079633, 0.78539816]) # may vary >>> np.angle(1+1j, deg=True) # in degrees 45.0 >>> np.angle([0., -0., complex(0., -0.), complex(-0., -0.)]) # convention array([ 0.
๐ŸŒ
Toppr
toppr.com โ€บ guides โ€บ python-guide โ€บ references โ€บ methods-and-functions โ€บ methods โ€บ built-in โ€บ cpmplex โ€บ python-complex
Python complex(): complex() Parameters, Examples
July 29, 2021 - ... x = complex(1) # Passing single ... numbers as input in python, the users will have to use the input() followed by the complex() to convert the input into complex numbers....
๐ŸŒ
Interactive Chaos
interactivechaos.com โ€บ en โ€บ python โ€บ function โ€บ complex
complex | Interactive Chaos
imag: (optional) imaginary part of the complex number to represent. It cannot be a text string. ... Examples are shown below in which the two arguments are added (both being integers), adding only real part or only imaginary part (and indicating the value 0 for the real part):
๐ŸŒ
NumPy
numpy.org โ€บ devdocs โ€บ reference โ€บ generated โ€บ numpy.angle.html
numpy.angle โ€” NumPy v2.5.dev0 Manual
This function passes the imaginary and real parts of the argument to arctan2 to compute the result; consequently, it follows the convention of arctan2 when the magnitude of the argument is zero. See example. ... Try it in your browser! >>> import numpy as np >>> np.angle([1.0, 1.0j, 1+1j]) # in radians array([ 0. , 1.57079633, 0.78539816]) # may vary >>> np.angle(1+1j, deg=True) # in degrees 45.0 >>> np.angle([0., -0., complex(0., -0.), complex(-0., -0.)]) # convention array([ 0.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-complex-function
Python complex() Function - GeeksforGeeks
July 23, 2025 - ... # Creating complex numbers c1 = complex(3, 4) c2 = complex(5) c3 = complex() print(c1) print(c2) print(c3) print(c1.real) print(c1.imag) ... Without any arguments: complex() returns 0j.
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ c-api โ€บ complex.html
Complex Number Objects โ€” Python 3.14.4 documentation
This instance of PyTypeObject represents the Python complex number type. It is the same object as complex in the Python layer. ... Return true if its argument is a PyComplexObject or a subtype of PyComplexObject.
๐ŸŒ
Wikitechy
wikitechy.com โ€บ tutorials โ€บ python โ€บ complex-numbers-in-python
python tutorial - Complex Numbers in Python | Introduction - By Microsoft Award MVP - learn python - python programming - Learn in 30sec | wikitechy
Phase is returned using phase(), which takes complex number as argument. The range of phase lies from -pi to +pi. i.e from -3.14 to +3.14. ... # Python code to demonstrate the working of # phase() # importing "cmath" for complex number operations import cmath # Initializing real numbers x = -1.0 y = 0.0 # converting x and y into complex number z = complex(x,y); # printing phase of a complex number using phase() print ("The phase of complex number is : ",end="") print (cmath.phase(z))
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ methods โ€บ built-in โ€บ complex
Python complex()
If the string passed to this method is not a valid complex number, ValueError exception is raised. Note: The string passed to complex() should be in the form real+imagj or real+imagJ ยท z = complex(2, -3) print(z) z = complex(1) print(z) z = complex() print(z) z = complex('5-9j') print(z)
๐ŸŒ
AskPython
askpython.com โ€บ home โ€บ numpy angle โ€“ returns the angle of a complex argument
NumPy angle - Returns the angle of a Complex argument - AskPython
February 16, 2023 - In all the above examples, we have passed a single complex number as an argument to the function np.angle() that calculates the angle of the input complex number.