-
classmethod galois.Array.repr(element_repr: 'int' | 'poly' | 'power' =
'int') Generator[None, None, None] Sets the element representation for all arrays from this
FieldArraysubclass.- Parameters:¶
- element_repr: 'int' | 'poly' | 'power' =
'int'¶ The field element representation.
"int"(default): Sets the representation to the integer representation."poly": Sets the representation to the polynomial representation."power": Sets the representation to the power representation.
Slower performance
To display elements in the power representation,
galoismust 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.
- element_repr: 'int' | 'poly' | 'power' =
- Returns:¶
A context manager for use in a
withstatement. If permanently setting the element representation, disregard the return value.
Notes
This function updates
element_repr.