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([14, 24, 25], order=31) In [3]: b = GF.Random(3); b Out[3]: GF([21, 26, 24], order=31) In [4]: np.dot(a, b) Out[4]: GF(30, order=31)
In [5]: A = GF.Random((3,3)); A Out[5]: GF([[28, 22, 0], [11, 26, 29], [25, 6, 30]], order=31) In [6]: B = GF.Random((3,3)); B Out[6]: GF([[21, 25, 16], [ 9, 29, 22], [11, 18, 24]], order=31) In [7]: np.dot(A, B) Out[7]: GF([[11, 5, 2], [ 9, 1, 18], [10, 6, 12]], order=31)