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

Christopher Barker Chris.Barker@noaa....
Sun Sep 16 18:26:44 CDT 2007


Charles R Harris wrote:
> On 9/10/07, *Christopher Barker* <Chris.Barker@noaa.gov 
>     STL either, so I'm not sure there is any downside to valarray. It looks
>     like neither one [vector or valarray] supports any kind of "view" semantics, so for the
>     purposes of numpy array wrapping, they really aren't any different.
> 
> I think that the originator of valarray saying it was misguided might be 
> considered a downside.

I had read that, though interestingly, I haven't seen any more recent 
commentary about the issues at all.

In any case, it appears that what Budge is saying is that the original 
goal of valarray being well used for optimized numerical routines isn't 
going to happen (I don't think it has, though there is a PPC altivec 
version out there). However std::vector doesn't have any numerical 
optimizations either, so I don't see any reason to choose std::vector 
over std:valarray.

My real question is what compiler and library writers are doing -- has 
anyone (OK, I guess MS and gcc are all I care about anyway) built 
anything optimized for them? Are they going to dump them? Who knows?

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception


More information about the Numpy-discussion mailing list