np.vdot
- np.vdot(a, b)
Returns the dot product of two Galois field vectors.
References
Examples
In [1]: GF = galois.GF(31) In [2]: a = GF.Random(3); a Out[2]: GF([14, 22, 7], order=31) In [3]: b = GF.Random(3); b Out[3]: GF([ 3, 11, 4], order=31) In [4]: np.vdot(a, b) Out[4]: GF(2, order=31)
In [5]: A = GF.Random((3,3)); A Out[5]: GF([[28, 8, 25], [21, 24, 7], [19, 6, 11]], order=31) In [6]: B = GF.Random((3,3)); B Out[6]: GF([[ 5, 17, 18], [ 1, 11, 18], [19, 25, 10]], order=31) In [7]: np.vdot(A, B) Out[7]: GF(22, order=31)