class galois.Array(numpy.ndarray)

An abstract ndarray subclass over a Galois field or Galois ring.

Important

Array is an abstract base class for FieldArray and cannot be instantiated directly.

Constructors

classmethod Identity(size: int, ...) Array

Creates an \(n \times n\) identity matrix.

classmethod Ones(shape: ShapeLike, ...) Array

Creates an array of all ones.

classmethod Random(shape: ShapeLike = (), ...) Array

Creates an array with random elements.

classmethod Range(start: ElementLike, stop, ...) Array

Creates a 1-D array with a range of elements.

classmethod Zeros(shape: ShapeLike, ...) Array

Creates an array of all zeros.

Methods

classmethod compile(mode)

Recompile the just-in-time compiled ufuncs for a new calculation mode.

classmethod display(...) Generator[None, None, None]

Sets the display mode for all arrays from this FieldArray subclass.

Properties

class property characteristic : int

The characteristic \(p\) of the Galois field \(\mathrm{GF}(p^m)\) or \(p^e\) of the Galois ring \(\mathrm{GR}(p^e, m)\).

class property default_ufunc_mode : 'jit-lookup' | 'jit-calculate' | 'python-calculate'

The default compilation mode of the Galois field or Galois ring.

class property degree : int

The degree \(m\) of the Galois field \(\mathrm{GF}(p^m)\) or Galois ring \(\mathrm{GR}(p^e, m)\).

class property display_mode : 'int' | 'poly' | 'power'

The current element representation of the Galois field or Galois ring.

class property dtypes : List[dtype]

List of valid integer numpy.dtype values that are compatible with this Galois field or Galois ring.

class property elements : Array

All elements of the Galois field or Galois ring.

class property irreducible_poly : Poly

The irreducible polynomial of the Galois field or Galois ring.

class property name : str

The name of the Galois field or Galois ring.

class property order : int

The order \(p^m\) of the Galois field \(\mathrm{GF}(p^m)\) or \(p^{em}\) of the Galois ring \(\mathrm{GR}(p^e, m)\).

class property primitive_element : Array

A primitive element of the Galois field or Galois ring.

class property ufunc_mode : 'jit-lookup' | 'jit-calculate' | 'python-calculate'

The current compilation mode of the Galois field or Galois ring.

class property ufunc_modes : List[str]

All supported compilation modes of the Galois field or Galois ring.

class property units : Array

All units of the Galois field or Galois ring.


Last update: Aug 27, 2022