np.insert

np.insert(array, object, values, axis=None)

Inserts values along the given axis.

See: https://numpy.org/doc/stable/reference/generated/numpy.insert.html

Examples

In [1]: GF = galois.GF(2**3)

In [2]: x = GF.Random(5); x
Out[2]: GF([6, 5, 5, 7, 0], order=2^3)

In [3]: np.insert(x, 1, [0,1,2,3])
Out[3]: GF([6, 0, 1, 2, 3, 5, 5, 7, 0], order=2^3)