We also had problems with passing numpy scalars to C++ using Boost (1.35 and before). Sometimes it succeeded, sometimes it failed depending on the data type and if your are on a 32-bit or 64-bit system. AFAIK Boost does not handle numpy scalar data types, so you have to do the conversion yourself. We've written such conversion functions (see pyrap.googlecode.com).
Cheers, Ger van Diepen >>> Bruce Sherwood <bruce.sherw...@gmail.com> 04/28/09 7:52 PM >>> I'm not sure this is the right forum for my question; it's quite possible that this is a numpy question. VPython (vpython.org) is the name of Python plus the 3D Visual module, which is mostly written in C++ and connected to Python using the Boost libraries. Visual imports numpy. When I build Visual for Python 2.6 and numpy 1.3.0, I get a failure on something that works on Python 2.5 with numpy 1.2.1. There is a vector(double,double,double) class in Visual which now fails if handed numpy.int32 arguments (works fine with numpy.float64 arguments). I was using Boost 1.35 with Python 2.5 and am using Boost 1.38 with Python 2.6. Any ideas or suggestions? Thanks. Bruce Sherwood _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig