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([24, 23, 12], order=31) In [3]: b = GF.Random(3); b Out[3]: GF([ 4, 9, 22], order=31) In [4]: np.dot(a, b) Out[4]: GF(9, order=31)
In [5]: A = GF.Random((3,3)); A Out[5]: GF([[17, 28, 26], [15, 11, 13], [19, 20, 9]], order=31) In [6]: B = GF.Random((3,3)); B Out[6]: GF([[ 0, 16, 7], [19, 19, 18], [15, 20, 21]], order=31) In [7]: np.dot(A, B) Out[7]: GF([[23, 22, 22], [ 1, 27, 18], [19, 27, 0]], order=31)