eelbrain.NDVar.norm

NDVar.norm(self, dim, ord=2, name=None)

Norm over dim

Parameters:
dim : str

Dimension over which to operate.

ord : scalar

See description of vector norm for scipy.linalg.norm() (default 2).

name : str

Name of the output NDVar (default is the current name).

Returns:
norm : NDVar

Norm over dim.

Examples

To normalize x along the sensor dimension:

>>> x /= x.norm('sensor')