complex | Modular

Mojo module

Implements the Complex dtype.

You can import these APIs from the complex package. For example:

from complex import ComplexSIMD

comptime values

ComplexFloat32

comptime ComplexFloat32 = ComplexSIMD[DType.float32, 1]

A complex number with 32-bit floating point components.

ComplexFloat64

comptime ComplexFloat64 = ComplexSIMD[DType.float64, 1]

A complex number with 64-bit floating point components.

ComplexScalar

comptime ComplexScalar = ComplexSIMD[?, 1]

Represents a scalar complex value.

Structs

Functions

  • abs: Performs elementwise abs (norm) on each element of the complex value.