np.dot

np.dot(a, b)[source]

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([ 7, 30, 25], order=31)

In [3]: b = GF.Random(3); b
Out[3]: GF([13,  3,  0], order=31)

In [4]: np.dot(a, b)
Out[4]: GF(26, order=31)
In [5]: A = GF.Random((3,3)); A
Out[5]: 
GF([[22, 17,  2],
    [ 3,  1, 29],
    [11, 30, 27]], order=31)

In [6]: B = GF.Random((3,3)); B
Out[6]: 
GF([[14, 15, 26],
    [22, 21, 18],
    [27, 28,  1]], order=31)

In [7]: np.dot(A, B)
Out[7]: 
GF([[23, 30, 12],
    [10, 10,  1],
    [24,  1, 16]], order=31)