title: Python: Add elements from 1D array to nD array with Numpy
body: <p>I have 2 ND arrays:</p>
  
  <pre><code>x = zeros(shape=(N,9)); vx = zeros(shape=(N,9))
  </code></pre>
  
  <p>I also have 2 1D arrays:</p>
  
  <pre><code>x0 = [] # array with 9 elements
  vx0 = [] # array with 9 elements
  </code></pre>
  
  <p>I want the following output:</p>
  
  <pre><code>x: [[ x0[0]  0.  0. ...,  0.  0.  0.][ x0[1]  0.  0. ...,  0.  0.  0.]... ]etc
  vx : [[ vx[0]  0.  0. ...,  0.  0.  0.][ vx[1]  0.  0. ...,  0.  0.  0.]...]etc
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>for k in range(8):
      x[k:0] = x[k:0] + x0[k]
      vx[k:0] = vx[k:0] + vx0[k]
  
  print x
  </code></pre>
  
  <p>x[0] will be the first array in the x-array.  x[0:0] will be the first element in the first list in the x-array</p>
  
  <p>I get following output: </p>
  
  <pre><code>[[ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
  ...] etc
  </code></pre>
  
  <p>But x0 contains floats different from 0. </p>
  
  <p>Can someone help me with my issue or point me in the right direction?</p>
  
  <p>EDIT: I used the Numpy module </p>