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([1, 4, 3, 1, 1], order=2^3) In [3]: np.insert(x, 1, [0,1,2,3]) Out[3]: GF([1, 0, 1, 2, 3, 4, 3, 1, 1], order=2^3)