-
classmethod galois.FieldArray.Ones(shape: ShapeLike, dtype: DTypeLike | None =
None
) FieldArray Creates an array of all ones.
- Parameters¶
- shape: ShapeLike¶
A NumPy-compliant
shape
tuple.- dtype: DTypeLike | None =
None
¶ The
numpy.dtype
of the array elements. The default isNone
which represents the smallest unsigned data type for thisFieldArray
subclass (the first element indtypes
).
- Returns¶
An array of ones.
Examples¶
In [1]: GF = galois.GF(31) In [2]: GF.Ones((2, 5)) Out[2]: GF([[1, 1, 1, 1, 1], [1, 1, 1, 1, 1]], order=31)