np.dot

np.dot(a, b)

Returns the dot product of two Galois field arrays.

References

Examples

In [1]: GF = galois.GF(31)

In [2]: a = GF.Random(3); a
Out[2]: GF([17, 27, 21], order=31)

In [3]: b = GF.Random(3); b
Out[3]: GF([15,  4,  6], order=31)

In [4]: np.dot(a, b)
Out[4]: GF(24, order=31)
In [5]: A = GF.Random((3,3)); A
Out[5]: 
GF([[ 8, 25,  7],
    [22, 15, 29],
    [ 3,  6,  5]], order=31)

In [6]: B = GF.Random((3,3)); B
Out[6]: 
GF([[27, 27, 13],
    [21, 28, 20],
    [19,  8, 23]], order=31)

In [7]: np.dot(A, B)
Out[7]: 
GF([[ 6, 11, 21],
    [ 3,  6, 13],
    [23, 10, 26]], order=31)