Here&#39;s the code which is the first cell of a sage notebook (sage 4.0)<br><br>%cython<br>import numpy as np<br>cimport numpy as np<br>DTYPE = <a href="http://np.int">np.int</a><br>ctypedef np.int_t DTYPE_t<br><br>Here&#39;s the error:<br>
<br><pre class="shrunk">Traceback (most recent call last):    DTYPE = <a href="http://np.int">np.int</a><br>  File &quot;/mnt/hdd/sage/sage-4.0/local/lib/python2.5/site-packages/sage/server/support.py&quot;, line 408, in cython_import_all<br>
    create_local_c_file=create_local_c_file)<br>  File &quot;/mnt/hdd/sage/sage-4.0/local/lib/python2.5/site-packages/sage/server/support.py&quot;, line 385, in cython_import<br>    create_local_c_file=create_local_c_file)<br>
  File &quot;/mnt/hdd/sage/sage-4.0/local/lib/python2.5/site-packages/sage/misc/cython.py&quot;, line 367, in cython<br>    raise RuntimeError, &quot;Error converting %s to C:\n%s\n%s&quot;%(filename, log, err)<br>RuntimeError: Error converting /home/tarbox/.sage/sage_notebook/worksheets/admin/89/code/sage23.spyx to C:<br>
<br><br>Error converting Pyrex file to C:<br>------------------------------------------------------------<br>...<br><br>include &quot;cdefs.pxi&quot;<br>import numpy as np<br>cimport numpy as np<br>DTYPE = <a href="http://np.int">np.int</a><br>
ctypedef np.int_t DTYPE_t        ^<br>------------------------------------------------------------<br><br>/home/tarbox/.sage/temp/hq2/12471/spyx/_home_tarbox__sage_sage_notebook_worksheets_admin_89_code_sage23_spyx/_home_tarbox__sage_sage_notebook_worksheets_admin_89_code_sage23_spyx_0.pyx:9:9: &#39;int_t&#39; is not a type identifier</pre>
<br clear="all">I tried with and without the &quot;import numpy&quot; directive thinking it may be redundant...<br><br>This example comes from the &quot;cython for numpy users&quot; tutorial on the wiki where it mentions that all numpy types have a corresponding _t type<br>
<br>There is indeed a <a href="http://numpy.int">numpy.int</a> type... so I was wondering if the new work with python buffers changed how things work.<br><br>-glenn<br><br>-- <br>Glenn H. Tarbox, PhD ||  206-274-6919<br><a href="http://www.tarbox.org">http://www.tarbox.org</a><br>