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

cmath.isinf

Prev: cmath.isfinite | Up: cmath | Next: cmath.isnan
Rel: cmath.acos, cmath.acosh, cmath.asin, cmath.asinh
Ref: docs.python.org — cmath.isinf
Tags: #public #python3 #stdlib #cmath


Import

import cmath
from cmath import isinf

Signature & Overview

cmath.isinf(z, /)

Checks if the real or imaginary part of z is infinite.

Usage

import cmath

assert cmath.isinf(complex(0, float("inf"))) is True
assert cmath.isinf(1 + 2j) is False

Gotchas

REPL Inspect

from cmath import isinf
help(isinf)

Linked from

Related notes