np.subtract

np.subtract(x, y)[source]

Subtracts two Galois field arrays element-wise.

References

Examples

In [1]: GF = galois.GF(31)

In [2]: x = GF.Random(10); x
Out[2]: GF([26,  5, 18,  1, 28, 27,  1,  3,  3,  5], order=31)

In [3]: y = GF.Random(10); y
Out[3]: GF([14, 25,  3,  9, 17, 25,  6,  2, 22, 27], order=31)

In [4]: np.subtract(x, y)
Out[4]: GF([12, 11, 15, 23, 11,  2, 26,  1, 12,  9], order=31)

In [5]: x - y
Out[5]: GF([12, 11, 15, 23, 11,  2, 26,  1, 12,  9], order=31)