title: Python: Draw line between two coordinates in a matrix
body: <p>I have a matrix of size <code>N x N</code> defined as <code>M = np.zeros((N,N))</code> and two coordinates <code>[x0,y0]</code> and <code>[x1,y1]</code>. Now I want to connect these two points with ones.</p>
  
  <p>An example for <code>N=5</code> would be:</p>
  
  <p>Lets set the coordinates to <code>2</code> in the matrix</p>
  
  <pre><code>[x0,y0] = [0,3]
  [x1,y1] = [4,2]
  </code></pre>
  
  <p>Then the matrix should look something like:</p>
  
  <pre><code>M = 
      0 0 0 2 0
      0 0 0 1 0
      0 0 1 0 0
      0 0 1 0 0
      0 0 2 0 0
  </code></pre>
  
  <p>What would be a simple approach to do that?</p>