-
classmethod galois.FieldArray.Vector(array: ArrayLike, dtype: DTypeLike | None =
None) FieldArray Creates an array over \(\mathrm{GF}(p^m)\) from length-\(m\) vectors over the prime subfield \(\mathrm{GF}(p)\).
This function is the inverse operation of the
vector()method.- Parameters¶
- array: ArrayLike¶
An array over \(\mathrm{GF}(p)\) with last dimension \(m\). An array with shape
(n1, n2, m)has output shape(n1, n2). By convention, the vectors are ordered from degree \(m-1\) to degree 0.- dtype: DTypeLike | None =
None¶ The
numpy.dtypeof the array elements. The default isNonewhich represents the smallest unsigned data type for thisFieldArraysubclass (the first element indtypes).
- Returns¶
An array over \(\mathrm{GF}(p^m)\).
Examples¶
In [1]: GF = galois.GF(3**3, display="poly") In [2]: a = GF.Vector([[1, 0, 2], [0, 2, 1]]); a Out[2]: GF([α^2 + 2, 2α + 1], order=3^3) In [3]: a.vector() Out[3]: GF([[1, 0, 2], [0, 2, 1]], order=3)