Hi Chris,
>> Thanks for the explanation. After having looked at the documentation, I
>> decided to do my own plain Python c-api implementation.
>>
>
> That is unlikely to be the best option these days -- it's simply too
> easy to make a type checking and or reference counting error.
>
> If
Hi Matthieu,
Thanks for the explanation. After having looked at the documentation, I
decided to do my own plain Python c-api implementation.
Thanks for your time
Raymond
Matthieu Brucher wrote:
> 2009/7/30 Raymond de Vries :
>
>> Hi
>>
>>
>>> Indeed,
gt;>>
>>>> In case you know that the C++ data won't go away before the Python
>>>> array, you can always wrap the container
>>>> (http://matt.eifelle.com/2008/11/04/exposing-an-array-interface-with-swig-for-a-cc-structure/)
>>>> with SWIG.
>>>>
Hi,
I'm sorry, I guess I did not search properly before For the record,
I solved my import_array() question: just need to add
%init %{
import_array();
%}
and the typemap for the std::vector works ok. Thanks for that!
Now the rest...
Thanks
Raymond
Raymond de Vries wrote:
> Hi
>
> In case you know that the C++ data won't go away before the Python
> array, you can always wrap the container
> (http://matt.eifelle.com/2008/11/04/exposing-an-array-interface-with-swig-for-a-cc-structure/)
> with SWIG.
>
> Matthieu
>
> 2009/7/30 Raymond de Vri
Hi everyone,
(I sent this message yesterday as well but somehow it didn't come
through...)
I would like to ask your advice how I can use NumPy to wrap my existing
C++ library with 2-dimensional arrays. I am wrapping the library with
swig and I have the typemap function declaration. But now I a