np.square

np.square(x)

Squares a Galois field array element-wise.

References

Examples

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

In [2]: x = GF.Random(10); x
Out[2]: GF([13, 10,  8, 26,  8, 11, 16,  5, 22, 18], order=31)

In [3]: np.square(x)
Out[3]: GF([14,  7,  2, 25,  2, 28,  8, 25, 19, 14], order=31)

In [4]: x ** 2
Out[4]: GF([14,  7,  2, 25,  2, 28,  8, 25, 19, 14], order=31)

In [5]: x * x
Out[5]: GF([14,  7,  2, 25,  2, 28,  8, 25, 19, 14], order=31)