title: What is the best way to create a block matrix form a row vector?
body: <p>I have the following numpy row matrix.</p>
  
  <pre><code>X = np.array([1,2,3])
  </code></pre>
  
  <p>I want to create a block matrix as follows:</p>
  
  <pre><code>1 0 0
  2 1 0
  3 2 1
  0 3 2
  0 0 3
  </code></pre>
  
  <p>How can I do this using numpy?</p>