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([ 7,  6, 18,  9,  7,  5,  6,  5,  8,  6], order=31)

In [3]: y = GF.Random(10); y
Out[3]: GF([24,  7,  1, 13,  9,  8, 12, 18,  7,  2], order=31)

In [4]: np.subtract(x, y)
Out[4]: GF([14, 30, 17, 27, 29, 28, 25, 18,  1,  4], order=31)

In [5]: x - y
Out[5]: GF([14, 30, 17, 27, 29, 28, 25, 18,  1,  4], order=31)