title: Setting elements of an array equal to zero
body: <p>let's say I have:</p>
  
  <pre><code>c = array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], float)
  </code></pre>
  
  <p>then I take a fast fourier transform:</p>
  
  <pre><code>r = rfft(c)
  </code></pre>
  
  <p>which produces the following complex array:</p>
  
  <pre><code>r = [ 21.+0.j ,  -3.+5.19615242j , -3.+1.73205081j , -3.+0.j ]
  </code></pre>
  
  <p>the number of elements in the new array is  1/2*N + 1.
  I'm trying to tell python to change the values of SPECIFIC elements in the new array. I want to tell python to keep the FIRST 50% of the elements and to set the others equal to zero, so instead the result would look like </p>
  
  <pre><code>r =     r = [ 21.+0.j ,  -3.+5.19615242j , 0 , 0 ]
  </code></pre>
  
  <p>how would I go about this?</p>