title: NumPy array initialization (fill with identical values)
body: <p>I need to create a NumPy array of length <code>n</code>, each element of which is <code>v</code>.</p>
  
  <p>Is there anything better than:</p>
  
  <pre><code>a = empty(n)
  for i in range(n):
      a[i] = v
  </code></pre>
  
  <p>I know <code>zeros</code> and <code>ones</code> would work for v = 0, 1. I could use <code>v * ones(n)</code>, but it <s>won't work when <code>v</code> is <code>None</code>, and also</s> would be much slower.</p>