[SciPy-dev] sparsetools_wrap.cxx

Nathan Bell wnbell at gmail.com
Sat Jan 6 06:23:59 CST 2007

On 1/6/07, Nils Wagner <nwagner at iam.uni-stuttgart.de> wrote:
> Hi,
> I cannot install the latest scipy (r2500) due to
> g++: Lib/sparse/sparsetools/sparsetools_wrap.cxx
> Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function
> »int SWIG_Python_ConvertFunctionPtr(PyObject*, void**,
> swig_type_info*)«:
> Lib/sparse/sparsetools/sparsetools_wrap.cxx:2000: Fehler:
> ungültige Umwandlung von »const char*« in »char*«
> Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function
> »int require_size(PyArrayObject*, int*, int)«:
> Lib/sparse/sparsetools/sparsetools_wrap.cxx:2677: Warnung:
> format »%d« erwartet Typ »int«, aber Argument 3 hat Typ
> »long int«

This appears to be a problem with require_size() in numpy.i

The sparsetools numpy.i was taken from the file of the same name in
the numpy/doc/swig

The problem seems to be that require_size() assumes npy_intp to be a C
int, but on other platforms it may be a long int.  I think what we
really want here is NPY_INTP_FMT which is #defined correctly.

I'm not completely comfortable with the magic in numpy.i, so I'll wait
for others to weigh-in before making any changes.

Nathan Bell wnbell at gmail.com

More information about the Scipy-dev mailing list