trait ExponentTrait (View source)

Exponent methods

Methods

static NdArray|int|float
exp(NdArray|array|int|float $m)

Calculate the exponential of all elements in the input array.

static NdArray|int|float
expm1(NdArray|array|int|float $m)

Calculate exp(x) - 1 for all elements in the array.

static NdArray|int|float
exp2(NdArray|array|int|float $m)

Calculate 2**p for all p in the input array.

static 
power(float|int|array|NdArray $matrix, float|int $exponent)

Matrix elements raised to powers.

static float|int|NdArray
square(float|int|array|NdArray $matrix)

The element-wise square of the input.

static NdArray
sqrt($matrix)

The non-negative square-root of an array, element-wise.

Details

final static NdArray|int|float exp(NdArray|array|int|float $m)

Calculate the exponential of all elements in the input array.

Parameters

NdArray|array|int|float $m

Return Value

NdArray|int|float

final static NdArray|int|float expm1(NdArray|array|int|float $m)

Calculate exp(x) - 1 for all elements in the array.

Parameters

NdArray|array|int|float $m

Return Value

NdArray|int|float

final static NdArray|int|float exp2(NdArray|array|int|float $m)

Calculate 2**p for all p in the input array.

Parameters

NdArray|array|int|float $m

Return Value

NdArray|int|float

final static power(float|int|array|NdArray $matrix, float|int $exponent)

Matrix elements raised to powers.

Parameters

float|int|array|NdArray $matrix
float|int $exponent

final static float|int|NdArray square(float|int|array|NdArray $matrix)

The element-wise square of the input.

Parameters

float|int|array|NdArray $matrix

Return Value

float|int|NdArray

final static NdArray sqrt($matrix)

The non-negative square-root of an array, element-wise.

Parameters

$matrix

Return Value

NdArray