DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
1+5 =
Submit