Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If your code spends most of its time in external libraries (that are already C/Cython) then it won't benefit from being rewritten. As a general strategy I'd recommend to first write a Python prototype, then identify speed-critical parts, and then selectively rewrite these bits in C/Cython.

Cython can and will call back into Python code, in particular you can import any Python module.

The %cython magic probably should automatically import sage.all