Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy insert

b = a.flatten()
>>> b
array([1, 1, 2, 2, 3, 3])
>>> np.insert(b, [2, 2], [5, 6])
array([1, 1, 5, ..., 2, 3, 3])
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #numpy #insert
ADD COMMENT
Topic
Name
3+5 =