let's say I have:
c = array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], float)
then I take a fast fourier transform:
r = rfft(c)
which produces the following complex array:
r = [ 21.+0.j , -3.+5.19615242j , -3.+1.73205081j , -3.+0.j ]
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
r = r = [ 21.+0.j , -3.+5.19615242j , 0 , 0 ]
how would I go about this?