-
classmethod galois.Poly.Like(poly_like: PolyLike, field: type[Array] | None =
None) Self Constructs a polynomial over \(\mathrm{GF}(p^m)\) from a
PolyLikeobject.Examples¶
Construct a polynomial over \(\mathrm{GF}(2)\) from a poly-like object.
In [1]: galois.Poly.Like(13) Out[1]: Poly(x^3 + x^2 + 1, GF(2)) In [2]: galois.Poly.Like("x^3 + x^2 + 1") Out[2]: Poly(x^3 + x^2 + 1, GF(2)) In [3]: galois.Poly.Like([1, 1, 0, 1]) Out[3]: Poly(x^3 + x^2 + 1, GF(2)) In [4]: galois.Poly.Like(galois.Poly([1, 1, 0, 1])) Out[4]: Poly(x^3 + x^2 + 1, GF(2))