norm#
- pymovements.gaze.transforms.norm(column: str | None = None, *, components: tuple[int, int] | tuple[str, str] = (0, 1), columns: tuple[str, str] | None = None) Expr[source]#
Take the norm of a 2D series.
The norm is defined by \(\sqrt{x^2 + y^2}\) with \(x\) being the yaw component and \(y\) being the pitch component of a coordinate.
- Parameters:
column (str | None) – Take the norm of the
componentsof this column with nested data (list or struct). This argumment is mutually exclusive with thecolumnsargument. (default:None)components (tuple[int, int] | tuple[str, str]) – If
columnis provided, take the norm of these two components in the specified nestedcolumn. If the tuple elements are of typeintthe nested column dtype is to be assumed aspolars.Listand child elements with that indices are used for taking the norm. If the tuple elements are of typestrthe nested column dtype is to be assumed aspolars.Structand the fields with these names are used for taking the norm. (default:(0, 1))columns (tuple[str, str] | None) – Two columns to take the norm of. This is mutually exclusive with the
columnargument. (default:None)
- Returns:
The respective polars expression.
- Return type:
pl.Expr