I am writing a C ++ library that can be invoked with both C ++ and Python using the SWIG-Python interface. I would like to make some functions in the library to return a numpy array when they are used in Python.
The SWIG documentation [1] says that numpy.iunderneath numpy/docs/swigcan be used for this purpose. But I can not find this directory on the following systems.
- Scientific Linux 6.4 (RHEL 6.4 clone) + Python 2.6 + NumPy 1.4 (installed via
yum) - OS X Mavericks + Python 2.7 + NumPy 1.8 (via
easy_install) - OS X Mavericks + Python 2.7 + NumPy 1.8 (built from source
python setup.py install)
In numpy-1.8.0/doc/swigexists numpy.iif I get the source code .tar.gz from the NumPy site. But this file is not installed automatically when executed python setup.py install.
So, I would like to know what is the best or recommended installation method numpy.ion my system.
As I distribute this library to my colleagues, posting numpy.iin my code can be a simple solution. But I'm talking about version mismatch with their NumPy.
[1] http://docs.scipy.org/doc/numpy/reference/swig.interface-file.html
source
share