[Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray <=> numpy.array typemap to share?

Xavier Gnata gnata@obs.univ-lyon1...
Wed Sep 5 07:08:16 CDT 2007


I'm using the numpy C API (PyArray_SimpleNewFromData) to perform the 
conversion but my code is written by hands. I would like to simplify it 
using SWIG but I also would like to see a good typemap valarray <=> 
numpy.array :)

Joris : Historical ones? Maybe also the fact that distutils has some small pb with C++ module. To sum up : You have to compile you module with the same compiler options you used to compile Python. Python is coded in C so some options does not make sense in C++.
As a result, you get warnings at compile time (see pylab compiled with gcc for instance).


Xavier



> A related question, just out of curiosity: is there a technical  
> reason why Numpy has been coded in C rather than C++?
>
> Joris
>
>
>
> On 05 Sep 2007, at 02:24, David Goldsmith wrote:
>
>   
>> Anyone have a well-tested SWIG-based C++ STL valarray <=> numpy.array
>> typemap to share?  Thanks!
>>
>> DG
>> -- 
>> ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/ 
>> emergencyresponse/>
>> _______________________________________________
>> Numpy-discussion mailing list
>> Numpy-discussion@scipy.org
>> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>>     
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>   


-- 
############################################
Xavier Gnata
CRAL - Observatoire de Lyon
9, avenue Charles André
69561 Saint Genis Laval cedex
Phone: +33 4 78 86 85 28
Fax: +33 4 78 86 83 86
E-mail: gnata@obs.univ-lyon1.fr
############################################ 



More information about the Numpy-discussion mailing list