I got it!

n = sympyexpression_whichevaluatestoacomplexnumber
expressionangle = sympy.arg( n )

Also a slight modification of Tom's suggestion works:

expressionangle2 = sympy.log( n ).as_real_imag()[1]

Thanks for help!

Answer from D A on Stack Overflow
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ reference โ€บ generated โ€บ numpy.angle.html
numpy.angle โ€” NumPy v2.4 Manual
The counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64. ... 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 ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ return-the-angle-of-the-complex-argument-in-radians-in-python-using-numpy
Return the Angle of the Complex Argument in Radians in Python using NumPy - GeeksforGeeks
July 23, 2025 - The NumPy library provides the numpy.angle() method to return the angle of the complex argument in radians in python. Let's look at the syntax of the method. ... deg:default value, boolean.
๐ŸŒ
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 - Thatโ€™s where the NumPy angle function comes into play. Note: A complex number z is represented as z = x+yi where x and y are real numbers.
๐ŸŒ
NumPy
numpy.org โ€บ devdocs โ€บ reference โ€บ generated โ€บ numpy.angle.html
numpy.angle โ€” NumPy v2.5.dev0 Manual
The counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64. ... 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 ...
๐ŸŒ
w3resource
w3resource.com โ€บ python-exercises โ€บ math โ€บ python-math-exercise-34.php
Python Math: Get the length and angle of a complex number - w3resource
August 11, 2025 - import cmath cn = complex(3,4) #length of a complex number. print("Length of a complex number: ", abs(cn)) # gets angle. return in radians, between [-ฯ€, ฯ€] print("Complex number Angle: ",cmath.phase(0+1j) ) ... Write a Python program to calculate ...
๐ŸŒ
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 Numpy. 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 โˆ’
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ numpy-angle-in-python
numpy.angle() in Python - GeeksforGeeks
November 28, 2018 - Syntax : numpy.angle(z, deg=0) Parameters : z : [array_like] A complex number or sequence of complex numbers. deg : [bool, optional] Return angle in degrees if True, radians if False (default).
Find elsewhere
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.0 โ€บ reference โ€บ generated โ€บ numpy.angle.html
numpy.angle โ€” NumPy v2.0 Manual
The counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64. Changed in version 1.16.0: This function works on subclasses of ndarray like ma.array. ... This function passes the imaginary and real parts of the argument to arctan2 to compute the result...
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.1 โ€บ reference โ€บ generated โ€บ numpy.angle.html
numpy.angle โ€” NumPy v2.1 Manual
The counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64. Changed in version 1.16.0: This function works on subclasses of ndarray like ma.array. ... This function passes the imaginary and real parts of the argument to arctan2 to compute the result...
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.2 โ€บ reference โ€บ generated โ€บ numpy.angle.html
numpy.angle โ€” NumPy v2.2 Manual
The counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64. ... 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 ...
๐ŸŒ
Tutorjoes
tutorjoes.in โ€บ Python_example_programs โ€บ get_length_and_angle_of_complex_number_in_python
Write a Python program to get the length and the angle of a complex number
Overall, this program provides a simple implementation of how to perform some operations on complex numbers in Python using the cmath module. It can be used to quickly perform complex number operations in Python. import cmath cn = complex(3,4) print("Length of a Complex Number: ", abs(cn)) print("Complex Number Angle : ",cmath.phase(0+1j) )
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_cmath_phase.asp
Python cmath.phase() Method
This angle is between vector (representing complex number) and positive x-axis is called Phase. Note: Output is always between -ฯ€ and ฯ€. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an ...