Skip to main content

abs

Overloads

NameDescription
abs(const ComplexArray arr) -> ComplexArrayCalculates the absolute values of the ComplexArray arr element-wise.
abs(const IntegerArray arr) -> IntegerArrayCalculates the absolute values of the IntegerArray arr element-wise.
abs(const RealArray arr) -> RealArrayCalculates the absolute values of the RealArray arr element-wise.

abs(const ComplexArray arr) -> ComplexArray

Calculates the absolute values of the ComplexArray arr element-wise.

Parameters

Example


var arr = ComplexArray([[-2 .. 3]])
abs(arr) // [2.0, 1.0, 0.0, 1.0, 2.0]

abs(const IntegerArray arr) -> IntegerArray

Calculates the absolute values of the IntegerArray arr element-wise.

Parameters

Example


var arr = IntegerArray([[-2 .. 3]])
abs(arr) // [2.0, 1.0, 0.0, 1.0, 2.0]

abs(const RealArray arr) -> RealArray

Calculates the absolute values of the RealArray arr element-wise.

Parameters

Example


var arr = RealArray([[-2 .. 3]])
abs(arr) // [2.0, 1.0, 0.0, 1.0, 2.0]