np.matmul¶
-
np.
matmul
(x1, x2)[source]¶ Computes the matrix multiplication of two Galois field arrays.
References
Examples
In [1]: GF = galois.GF(31) In [2]: x1 = GF.Random((3,4)); x1 Out[2]: GF([[21, 15, 5, 22], [10, 7, 25, 3], [26, 6, 0, 4]], order=31) In [3]: x2 = GF.Random((4,5)); x2 Out[3]: GF([[18, 19, 4, 15, 23], [11, 27, 13, 4, 4], [10, 2, 26, 16, 13], [ 2, 14, 13, 23, 23]], order=31) In [4]: np.matmul(x1, x2) Out[4]: GF([[17, 6, 13, 0, 29], [17, 6, 14, 27, 1], [15, 30, 17, 10, 1]], order=31) In [5]: x1 @ x2 Out[5]: GF([[17, 6, 13, 0, 29], [17, 6, 14, 27, 1], [15, 30, 17, 10, 1]], order=31)