I’m new to Julia and am trying to assign to a constant to locations in a multidimensional array using indexes specified in another array. I can do this with a for loop easily, but am trying to understand how to do it as a comprehension or something else without the loop.
Thanks, I didn’t realize this post went through. I had just setup my account and accidentally posted this without finishing writing it. I answered my own question shortly after. Your second answer is closer to what I was looking for.
I was trying to assign a to locations in an array where the locations where specified in another array. For example: