Equana

Back to NDArray Operations

epow

Element-wise power (.^). Raises each element to the given power.

Syntax

epow(a: NDArray, n: Int64) → r

Backends

TypeScriptnumwa

Description

Element-wise power (.^). Raises each element to the given power.

Parameters

NameDescription
aBase array
nExponent (scalar)

Returns

NDArray with each element raised to the power n

Examples

Try It
>> epow([2, 3, 4], 2)
[4, 9, 16]