[Numpy-discussion] default float type of array not accepted by SWIG wrapped C functions

Rich E reakinator at gmail.com
Thu Jan 22 11:45:51 EST 2009


Hi all,

I have a SWIG wrapped C library that uses 32bit floating point arrays,
using the numpy.i typemapping system for passing the arrays.  For
every array that I make, I have to convert it using astype('float32'),
else python complains that I tried to pass a double-precision array.

Is there any way to set the default floating point precision to 32bit,
in python or in the SWIG interface file?

regards,
Rich



More information about the NumPy-Discussion mailing list