Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy add to same index multiple times

a = np.array([0, 0, 0])
pos = [0, 0, 0]
np.add(a, pos, 1)
print(a)
# a = [3, 0, 0]
 
PREVIOUS NEXT
Tagged: #numpy #add #index #multiple #times
ADD COMMENT
Topic
Name
7+2 =