Reputation: 531
I have an array A and a list b. I want to put number c in the location b of array A. For example, assume
import numpy
size = 4
size_maker = [2] * size
A = numpy.zeros(shape=size_maker)
b = [0,1,0,0]
c = 20
I want to have A[0,1,0,0] = 20. Any idea?
Upvotes: 0
Views: 34