-
galois.set_printoptions(coeffs: 'desc' | 'asc' =
'desc'
) Modifies the print options for the package. This function is the
galois
equivalent ofnumpy.set_printoptions()
.- Parameters¶
- coeffs: 'desc' | 'asc' =
'desc'
¶ The order in which to print the coefficients, either in descending degrees (default) or ascending degrees.
- coeffs: 'desc' | 'asc' =
See also
Examples¶
By default, polynomials are displayed with descending degrees.
In [1]: GF = galois.GF(3**5, display="poly") In [2]: a = GF([109, 83]); a Out[2]: GF([α^4 + α^3 + 1, α^4 + 2], order=3^5) In [3]: f = galois.Poly([3, 0, 5, 2], field=galois.GF(7)); f Out[3]: Poly(3x^3 + 5x + 2, GF(7))
Modify the print options to display polynomials with ascending degrees.
In [4]: galois.set_printoptions(coeffs="asc") In [5]: a Out[5]: GF([1 + α^3 + α^4, 2 + α^4], order=3^5) In [6]: f Out[6]: Poly(2 + 5x + 3x^3, GF(7))