np.vdot¶
- np.vdot(a, b)[source]¶
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([18, 9, 14], order=31) In [3]: b = GF.Random(3); b Out[3]: GF([13, 11, 13], order=31) In [4]: np.vdot(a, b) Out[4]: GF(19, order=31)
In [5]: A = GF.Random((3,3)); A Out[5]: GF([[27, 3, 15], [ 4, 19, 4], [14, 0, 24]], order=31) In [6]: B = GF.Random((3,3)); B Out[6]: GF([[20, 29, 22], [30, 4, 21], [16, 15, 21]], order=31) In [7]: np.vdot(A, B) Out[7]: GF(12, order=31)