neurodsp.utils.norm.normalize_variance

neurodsp.utils.norm.normalize_variance(array, variance=1.0)[source]

Normalize the variance of an array, updating to specified variance.

Parameters
array1d array

Data to normalize variance to.

variancefloat, optional, default: 1.0

Variance to normalize to.

Returns
out1d array

Variance normalized data.

Notes

If the input array is all zeros, this function simply returns the input.