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