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