title: np.diag not including 0s in the array
body: <p>I have an expression that yields the following result:</p>
  <pre><code>array([[0.5],
     [0. ]])
  </code></pre>
  <p>I want to make a diagonal 2X2 matrix which has 0.5 and 0 on its diagonal. But when I use the following code:</p>
  <pre><code>np.diag(A)
  </code></pre>
  <p>A being the above array, I get the following result:</p>
  <pre><code>array([0.5])
  </code></pre>
  <p>Why does python not include the second element from A on the array and how can I include it?</p>