On this page
  1. cmath.phase
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

cmath.phase

Prev: cmath.log10 | Up: cmath | Next: cmath.polar
Rel: cmath.acos, cmath.acosh, cmath.asin, cmath.asinh
Ref: docs.python.org — cmath.phase
Tags: #public #python3 #stdlib #cmath


Import

import cmath
from cmath import phase

Signature & Overview

cmath.phase(z, /)

Return argument, also known as the phase angle, of a complex.

Usage

import cmath

assert cmath.isclose(cmath.phase(-1 + 0j), cmath.pi)
assert cmath.isclose(cmath.phase(1j), cmath.pi / 2)

Gotchas

REPL Inspect

from cmath import phase
help(phase)

Linked from

Related notes