IrrepsLayout#

class cuequivariance.IrrepsLayout(*values)#

Enum for the possible data layouts.

mul_ir#

Multiplicity first, then irreducible representation. This layout corresponds to the layout used in the library e3nn.

ir_mul#

Irreducible representation first, then multiplicity. This layout differs from the one used in e3nn but can be more convenient in some cases.

Examples

>>> cue.mul_ir
(mul,irrep)
>>> cue.ir_mul
(irrep,mul)

Methods

shape(
mulir: MulIrrep | tuple[int, Irrep],
) tuple[int, int]#

The shape of the tensor for the given layout.

Examples

>>> mulir = cue.MulIrrep(32, cue.O3(2, -1))
>>> mulir
32x2o
>>> cue.mul_ir.shape(mulir)
(32, 5)
>>> cue.ir_mul.shape(mulir)
(5, 32)