class property galois.FieldArray.element_repr : Literal[int] | Literal[poly] | Literal[power]

The current finite field element representation.

Notes

This can be changed with repr(). See Element Representation for a further discussion.

Examples

The default element representation is the integer representation.

In [1]: GF = galois.GF(3**2)

In [2]: x = GF.elements; x
Out[2]: GF([0, 1, 2, 3, 4, 5, 6, 7, 8], order=3^2)

In [3]: GF.element_repr
Out[3]: 'int'

Permanently modify the element representation by calling repr().

In [4]: GF.repr("poly");

In [5]: x
Out[5]: 
GF([     0,      1,      2,      α,  α + 1,  α + 2,     2α, 2α + 1,
    2α + 2], order=3^2)

In [6]: GF.element_repr
Out[6]: 'poly'