The cmath.atan() function calculates the arc tangent of a given complex number. The input value can be a real or complex number but the returned value will always be complex.

math.atan(x)
x The value(real or complex) whose inverse tangent is to be calculated

The function returns the arc tangent of the given number ,x, in radians. The returned value is a complex number iregardless of whether the input value is real or complex. If is a real number, the returned value has 0j as its complex number.

import cmath 

print(cmath.atan(-12))
print(cmath.atan(1 + 3j))
print(cmath.atan(-0.5 -2j))