A[indices] = Values

?

On Wednesday, October 26, 2016 at 9:53:17 AM UTC-4, Tsur Herman wrote:
>
> What would you suggest is a fast and elegant way to achieve indexing into 
> an array using a set of indices?
>
> function setindices!(A,Values,Indices)
>     assert(length(Values) == size(Indices,1))
>     for i=1:length(Values)
>         setindex!(A,Values[i],(Indices[i,:]...)...)
>     end
> end
>
> I am currently using this function and I was wondering whether I missed 
> something.
>
>

Reply via email to