title: Python numpy - fill numpy array with ascending values
body: <p>I am trying to initialize a <code>numpy array</code> or a <code>list</code> with ascending values. The number of values is <code>n</code>.</p>
  <p>e.g: If <code>n = 10</code></p>
  <pre><code>[0,2,4,6,8,10,12,14,16,18]
  </code></pre>
  <p>If <code>n = 2</code></p>
  <pre><code>[0,2]
  </code></pre>
  <p>I am aware that I could use a <code>for</code> like this:</p>
  <pre><code>result = []
  for x in range(n):
     result.append(x*2)
  </code></pre>
  <p>But when <code>n</code> gets larger this would take a while so I was looking for a faster way.</p>