<div dir="ltr">Without knowing more about the "blitz" stuff, it is hard to provide detailed help.  <div><br></div><div>However, it looks like you have a template taking a non-typename as a parameter, which is not currently supported in Cython.</div><div><br></div><div>In other words, the 1 in [double,1] is not a type name, and that causes Cython to give up.  There is a pull request in progress to fix this issue on GitHub, but I'm not sure what the latest is on that.<br><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 31, 2016 at 11:07 PM Elizabeth Fischer <<a href="mailto:rpf2116@columbia.edu">rpf2116@columbia.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Cython is crashing on me when I compile.  See below.<div><br></div><div>-- Elizabeth<br><div><br></div><div>







<p>cython --version</p>
<p>Cython version 0.23.4</p></div><div><br></div><div><div>Error compiling Cython file:</div><div>------------------------------------------------------------</div><div>...</div><div>#        cdef int flags</div><div><br></div><div>def test_double_blitz(a):</div><div><span style="white-space:pre-wrap">       </span>cdef vector[int] v</div><div><span style="white-space:pre-wrap">       </span>cdef cblitz.Array[double,1] a_b</div><div><span style="white-space:pre-wrap">  </span>a_b = cibmisc.np_to_blitz[double,1](a, b'var', [-1])</div><div>                         ^</div><div>------------------------------------------------------------</div><div><br></div><div>/Users/rpfische/git/ibmisc/pylib/ibmisc.pyx:38:26: Compiler crash in AnalyseExpressionsTransform</div><div><br></div><div>ModuleNode.body = StatListNode(ibmisc.pyx:1:0)</div><div>StatListNode.stats[3] = StatListNode(ibmisc.pyx:35:0)</div><div>StatListNode.stats[0] = DefNode(ibmisc.pyx:35:0,</div><div>    modifiers = [...]/0,</div><div>    name = 'test_double_blitz',</div><div>    num_required_args = 1,</div><div>    py_wrapper_required = True,</div><div>    reqd_kw_flags_cname = '0',</div><div>    used = True)</div><div>File 'Nodes.py', line 430, in analyse_expressions: StatListNode(ibmisc.pyx:36:1)</div><div>File 'Nodes.py', line 4775, in analyse_expressions: SingleAssignmentNode(ibmisc.pyx:38:36)</div><div>File 'Nodes.py', line 4887, in analyse_types: SingleAssignmentNode(ibmisc.pyx:38:36)</div><div>File 'ExprNodes.py', line 4640, in analyse_types: SimpleCallNode(ibmisc.pyx:38:36,</div><div>    analysed = True,</div><div>    result_is_used = True,</div><div>    use_managed_ref = True)</div><div>File 'ExprNodes.py', line 3109, in analyse_types: IndexNode(ibmisc.pyx:38:26,</div><div>    is_called = 1,</div><div>    is_subscript = True,</div><div>    result_is_used = True,</div><div>    use_managed_ref = True)</div><div>File 'ExprNodes.py', line 3419, in analyse_base_and_index_types: IndexNode(ibmisc.pyx:38:26,</div><div>    is_called = 1,</div><div>    is_subscript = True,</div><div>    result_is_used = True,</div><div>    use_managed_ref = True)</div><div><br></div><div>Compiler crash traceback from this point on:</div><div>  File "/Users/rpfische/macports/mpgompi-4.9.3/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Cython/Compiler/ExprNodes.py", line 3419, in analyse_base_and_index_types</div><div>    elif len(base_type.templates) != len(self.type_indices):</div><div>TypeError: object of type 'NoneType' has no len()</div><div>make[2]: *** [pylib/ibmisc.cpp] Error 1</div><div>make[2]: *** Deleting file `pylib/ibmisc.cpp'</div><div>make[1]: *** [pylib/CMakeFiles/ibmisc_so.dir/all] Error 2</div><div>make: *** [all] Error 2</div></div><div><br></div></div></div>
_______________________________________________<br>
cython-devel mailing list<br>
<a href="mailto:cython-devel@python.org" target="_blank">cython-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/cython-devel" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/cython-devel</a><br>
</blockquote></div></div></div>