[C++-sig] Trouble converting data from numpy.array to c++

2010-05-11 Thread QUILLET Jean-Charles
Hi, I've got this problem I cannot solve. I've a c++ application from which I create an array sending to python this string: anArray = numpy.array((1, 2, 3)) After extracting the symbol "anArray" from the directory in a boost::python::object, I'm trying to extract the values in C++: int val =

Re: [C++-sig] Trouble converting data from numpy.array to c++

2010-05-11 Thread Ger van Diepen
Hi Jean-Charles, AFAIK there are no standard converters for the numpy scalar types to C++ types. In pyrap it is solved by having explicit converters for numpy scalar types to C++ types (see pyrap.googlecode.com). Cheers, Ger >>> QUILLET Jean-Charles 05/11/10 11:38 AM >>> Hi, I've got this pro

Re: [C++-sig] Trouble converting data from numpy.array to c++

2010-05-11 Thread QUILLET Jean-Charles
Thanks Ger, I'll check out this, it seems very interesting. But I'm confused because what I'm describing is working without any problem on windows using Visual Studio 2005 python 2.5 and boost 1.34 But for some reason I cant use these versions on Linux because of an incompatibility between Qt a

Re: [C++-sig] Trouble converting data from numpy.array to c++

2010-05-11 Thread Andreas Kloeckner
Hi Jean-Charles, On Tue, 11 May 2010 11:32:08 +0200, QUILLET Jean-Charles wrote: > I've got this problem I cannot solve. I've a c++ application from which I > create an array sending to python this string: > > anArray = numpy.array((1, 2, 3)) > > After extracting the symbol "anArray" from the

[C++-sig] When not to use static boost python library

2010-05-11 Thread Mr Kun Hong
Hi, I am new to boost python. I have some experience making python extension using pure C. Now I have a question: when should I not use static boost python library? I tried to search the archive a bit. But haven't found a good answer. I read the boost python library documentation, where the sect