# lentil.normalize_power¶

lentil.normalize_power(array, power=1)[source]

Normalizie the power in an array.

The total power in an array is given by

$P = \sum{\left|\mbox{array}\right|^2}$

A normalization coefficient is computed as

$c = \sqrt{\frac{p}{\sum{\left|\mbox{array}\right|^2}}}$

The array returned by a will be scaled by the normalization coefficient so that its power is equal to $$p$$.

Parameters
• array (array_like) – Array to be normalized

• power (float, optional) – Desired power in normalized array. Default is 1.

Returns

array – Normalized array

Return type

ndarray