Equana

Back to NDArray Operations

pow

Element-wise power. Raises each element of a to the integer power n.

Syntax

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

Backends

TypeScriptnumwa

Description

Element-wise power. Raises each element of a to the integer power n.

Parameters

NameDescription
aBase array
nInteger exponent

Returns

NDArray with each element raised to the power n

Examples

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

Other Overloads