classmethod galois.Array.repr(element_repr: 'int' | 'poly' | 'power' = 'int') Generator[None, None, None]

Sets the element representation for all arrays from this FieldArray subclass.

element_repr: 'int' | 'poly' | 'power' = 'int'

The field element representation.

Slower performance

To display elements in the power representation, galois must compute the discrete logarithm of each element displayed. For large fields or fields using explicit calculation, this process can take a while. However, when using lookup tables this representation is just as fast as the others.


A context manager for use in a with statement. If permanently setting the element representation, disregard the return value.


This function updates element_repr.