Insert values along the given axis before the given indices.
Parameters: | arr : array_like
obj : {integer, slice, integer array_like}
values : :
axis : int, optional
|
---|
Examples
>>> a = np.array([[1,2,3],
... [4,5,6],
... [7,8,9]])
>>> np.insert(a, [1,2], [[4],[5]], axis=0)
array([[1, 2, 3],
[4, 4, 4],
[4, 5, 6],
[5, 5, 5],
[7, 8, 9]])