title: how to define a list in Cython
body: <p>I want to transform the below <code>python</code> code in <code>Cython</code>:</p>
  
  <pre><code>x_array = []
  
  x_array.append(x_new)
  </code></pre>
  
  <p>I tried the following Cython codes but it gives error:</p>
  
  <pre><code>cdef np.ndarray[double, dim=1] x_array
  
  x_array.append(x_new)
  </code></pre>
  
  <p>The error shows: </p>
  
  <p><code>Cannot coerce list to type [double, dim=1]</code></p>