title: Using cython to early type class attributes
body: <p>I'm writing a python class and I would like to accelerate the execution using cython early typing.<br>
  I get the error <code>"Syntax error in C variable declaration"</code> when I try to cython compile the following:</p>
  
  <pre><code>import numpy as np
  cimport numpy as np
  
  class MyClass:
      def __init__( self, np.ndarray[double, ndim=1] Redges ):
          self.Redges = Redges
          cdef double self.var1
  </code></pre>
  
  <p>The error concerns the syntax of the last line involving <code>self.var1</code>.  Am I not allowed to type class attributes directly?  Do I always have to break this up into two steps such as, </p>
  
  <pre><code>cdef double var1
  self.var1 = var1
  </code></pre>
  
  <p>The full error traceback is, </p>
  
  <pre><code>test.pyx:7:24:  
  Syntax error in C variable declaration  
  Traceback (most recent call last):  
  File "setup.py", line 9, in &lt;module&gt;  
          ext_modules = cythonize('test.pyx'), # accepts a glob pattern  
        File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 713, in cythonize
          cythonize_one(*args[1:])  
        File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 780, in cythonize_one  
          raise CompileError(None, pyx_file)  
    Cython.Compiler.Errors.CompileError: calc_iliev_sphere.pyx
  </code></pre>