title: New multidimensional array assigning values from array to indices of second array
body: <p>While I don't feel this is overly complex, I'm struggling with how to even search for similar questions/answers.</p>
  
  <p>I have two arrays.</p>
  
  <p>indices_array: <code>[0, 1, 1, 0, 0, 1, 0]</code></p>
  
  <p>value_array:   <code>[1, 2, 3, 4, 5, 6, 7]</code></p>
  
  <p>I want to create a new array using the first array as indices for assignment and the second array for values. This should result in a new array with two values per index, however, one value being zero and the other being the value from my second array.</p>
  
  <p>Using my example arrays above, it should result in:</p>
  
  <pre><code>[[1, 0],
   [0, 2],
   [0, 3],
   [4, 0],
   [5, 0],
   [0, 6],
   [7, 0]]
  </code></pre>
  
  <p>I can easily create an empty version of my desired array using: <code>np.zeros((total_len, values_per_index))</code></p>
  
  <p>My intuition fails when attempting something like: <code>target_array[indices_array] = value_array</code></p>
  
  <p>I believe I understand why my attempted method fails, but how to actually accomplish this eludes me. Is there a simple way of doing this? Python is not my best language by far and some of the numpy tricks seem overly magical in nature at times.. </p>
  
  <p>Edit: I know a for loop would accomplish this, but I'm truly looking to understand numpy better and to ideally avoid iteration when possible for code cleanliness as much as readability.</p>