append() takes at least 2 arguments (1 given)?
<p>I am trying to solve a for the real roots of my cubic equation where my coefficnets are actually arrays. I was able to find the roots but I am also trying to append all the real roots into a separtae array so I can use it for my other problems. I am not sure what I am doing wrong. The error that comes out is:</p>

<blockquote>
  <p>append() takes at least 2 arguments (1 given).</p>
</blockquote>

<p>P.S: <code>gradU_all</code> is some array that I have previously defined.</p>

<p>MY CODE STARTS HERE: (ignore the weird format)</p>

<pre><code>S=gradU_all

print S.shape

Wi=50

L=10

a=2*S**2*Wi**2

print a.shape

b=0

c=np.ones(N+2)

c*=L**2

c+=3

print c.shape

d=np.ones(N+2)

d*=-L**2

print d.shape


def Find_psi_real_roots():

    psi_real_roots=np.zeros(N+2)
    for i in range(N+2):
        #print 'for i:', i
        coeff= [a[i],0,103,-100]
        r=np.roots(coeff)
        real_valued = r.real[abs(r.imag)==0]
        psi_real_roots=np.append(real_valued[i])


Find_psi_real_roots()
</code></pre>