title: Indexing a 2d array with another 2d array
body: <p>I have an array <code>lines = np.array[[0,0],[0,1],[1,0],[1,2],[2,0],[2,1],[2,3],[3,1],[3,3],[0,1],[1,2],[4,4]]</code>
  and another numpy zeros array <code>vectors = [[0. 0. 0. 0. 0.],[0. 0. 0. 0. 0.],[0. 0. 0. 0. 0.],[0. 0. 0. 0. 0.],[0. 0. 0. 0. 0.]]</code> I want to use the elements in the first array(lines) to insert &quot;1's&quot; into the second array(vectors).</p>
  <p>So my desired output would be:</p>
  <pre><code>vectors = 
  [[1. 1. 1. 0. 0.],
  [1. 0. 1. 1. 0.],
  [0. 1. 0. 0. 0.],
  [0. 0. 1. 1. 0.],
  [0. 0. 0. 0. 1.]]
  </code></pre>
  <p>Note: Take into account in the lines array all the second numbers are used to index a particular array in the vectors array and the first number is where to place the &quot;1&quot;. e.g., lines[2] = [1,0], lines[2][1] = 0 and lines[2][0] = 1 so you will use the 0 to index into the 0th array in the vectors array and place a &quot;1&quot; in the 1st position(index 1).</p>
  <p>Apologies if I explained it badly I am new to python and StackOverflow.</p>