Docs
Unary Ops

Unary Operations

Unary operations take a single array as input, perform element-wise unary operations, and return a new array. Most unary operations work on real valued as well as complex valued arrays.

abs

def abs(arg0: Array) -> Array
Computes the absolute value of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the absolute value of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

acos

def acos(arg0: Array) -> Array
Computes the inverse cosine of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the inverse cosine of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Real-valued arguments in the range [-1, 1].

asin

def asin(arg0: Array) -> Array
Computes the inverse sine of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the inverse sine of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Real-valued arguments in the range [-1, 1].

atan

def atan(arg0: Array) -> Array
Computes the inverse tangent of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the inverse tangent of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Real-valued arguments.

cos

def cos(arg0: Array) -> Array
Computes the cosine of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the cosine of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

cosh

def cosh(arg0: Array) -> Array
Computes the hyperbolic cosine of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the hyperbolic cosine of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

exp

def exp(arg0: Array) -> Array
Computes the exponential of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the exponential of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

log

def log(arg0: Array) -> Array
Computes the natural logarithm of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the natural logarithm of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

neg

def neg(arg0: Array) -> Array
Computes the negation of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the negation of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

reciprocal

def reciprocal(arg0: Array) -> Array
Computes the reciprocal of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the reciprocal of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

relu

def relu(arg0: Array) -> Array
Computes the Rectified Linear Unit of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the ReLU of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Real-valued arguments.

sigmoid

def sigmoid(arg0: Array) -> Array
Computes the sigmoid function of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the sigmoid of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Real-valued arguments.

sign

def sign(arg0: Array) -> Array
Computes the sign of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the sign of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Real-valued arguments.

sin

def sin(arg0: Array) -> Array
Computes the sine of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the sine of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

sinh

def sinh(arg0: Array) -> Array
Computes the hyperbolic sine of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the hyperbolic sine of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

sqrt

def sqrt(arg0: Array) -> Array
Computes the square root of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the square root of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

square

def square(arg0: Array) -> Array
Computes the square of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the square of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

tan

def tan(arg0: Array) -> Array
Computes the tangent of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the tangent of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.

tanh

def tanh(arg0: Array) -> Array
Computes the hyperbolic tangent of the input array element-wise.
Args

arg0: The input array.

Returns

An array containing the hyperbolic tangent of each element in the input array.

Note

This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.