galois
galois copied to clipboard
FieldArray `repr` not applied in `print()`
GF = galois.GF(2**3, repr="poly")
print(GF.properties)
alpha = GF.primitive_element
print(f"Primitive element: {alpha}")
Galois Field:
name: GF(2^3)
characteristic: 2
degree: 3
order: 8
irreducible_poly: x^3 + x + 1
is_primitive_poly: True
primitive_element: x
Primitive element: 2
Manually adding str() makes it work.
print(f"Primitive element: {str(alpha)}")
# Primitive element: α