package owl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type elt
type arr
type cast_arr
Complex operations
val complex : cast_arr -> cast_arr -> arr

``complex re im`` constructs a complex ndarray/matrix from ``re`` and ``im``. ``re`` and ``im`` contain the real and imaginary part of ``x`` respectively.

Note that both ``re`` and ``im`` can be complex but must have same type. The real part of ``re`` will be the real part of ``x`` and the imaginary part of ``im`` will be the imaginary part of ``x``.

val polar : cast_arr -> cast_arr -> arr

``polar rho theta`` constructs a complex ndarray/matrix from polar coordinates ``rho`` and ``theta``. ``rho`` contains the magnitudes and ``theta`` contains phase angles. Note that the behaviour is undefined if ``rho`` has negative elelments or ``theta`` has infinity elelments.

val re : arr -> cast_arr
val im : arr -> cast_arr
val sum' : arr -> elt