[Numpy-discussion] numpy.i and std::complex

Sturla Molden sturla.molden at gmail.com
Mon Oct 27 12:27:04 EDT 2014


Glen Mabey <gmabey at swri.org> wrote:

> I chose swig after reviewing the options listed here, and I didn't see cython on the list:
> 
> http://docs.scipy.org/doc/numpy/user/c-info.python-as-glue.html

It's because that list is old and has not been updated. It has the
predecessor to Cython, Pyrex, but they are very different now.

Both SciPy and NumPy has Cython as a build dependency, and also projects
like scikit-learn, scikit-image, statsmodels. 

If you find C++ projects which use Swig (wxPython, PyWin32) or SIP (PyQt)
it is mainly because they are older than Cython. A more recent addition,
PyZMQ, use Cython to wrap C++.


> I guess that's because cython is different language, right?  So, if I
> want to interactively call C++ functions from say ipython, then is cython really an option?

You can use Cython to call C++ functions in ipython and ipython notebook.

cythonmagic takes care of that :-)


Sturla




More information about the NumPy-Discussion mailing list