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([ 4, 29, 5], order=31) In [3]: b = GF.Random(3); b Out[3]: GF([30, 3, 4], order=31) In [4]: np.dot(a, b) Out[4]: GF(10, order=31)
In [5]: A = GF.Random((3,3)); A Out[5]: GF([[19, 11, 21], [ 7, 3, 24], [18, 16, 23]], order=31) In [6]: B = GF.Random((3,3)); B Out[6]: GF([[ 9, 3, 20], [29, 17, 27], [23, 25, 25]], order=31) In [7]: np.dot(A, B) Out[7]: GF([[12, 25, 24], [20, 21, 15], [ 8, 2, 3]], order=31)