lgatr.interface.scalar

Embedding and extracting scalars into multivectors.

Functions

embed_scalar(scalars)

Embed scalars into multivectors.

extract_scalar(multivectors)

Extract scalars from multivectors.

lgatr.interface.scalar.embed_scalar(scalars)[source]

Embed scalars into multivectors.

Parameters:

scalars (Tensor) – Scalars of shape (..., 1).

Returns:

Multivectors of shape (..., 16). multivectors[..., [0]] is the same as scalars; the other components are zero.

Return type:

multivectors

lgatr.interface.scalar.extract_scalar(multivectors)[source]

Extract scalars from multivectors.

Parameters:

multivectors (Tensor) – Multivectors of shape (..., 16).

Returns:

Scalars of shape (..., 1).

Return type:

scalars