[C++-sig] boost.python and numpy.int32 on 64-bit system

Ger van Diepen diepen at astron.nl
Tue May 27 09:20:22 CEST 2008


I've solved the boost.python / numpy issue by writing special converters for numpy array scalars. The PyUBlas converters of Andreas gave good insight how to do it (I couldn't use them because they are too strongly typed). 
It handles all conversions needed, so e.g. a numpy.int16 can be converted to an int or float.
It also handles numpy array scalars contained in sequences.
It works fine on 32-bit and 64-bit systems.

In the process I found a little problem in implicit.hpp about which I'll report in a separate message.

Ger





More information about the Cplusplus-sig mailing list