[C++-sig] more examples of automatic type conversion
Neal Becker
ndbecker2 at gmail.com
Thu May 3 01:56:23 CEST 2007
Eric Jonas wrote:
>> I'm very interested in interfacing various c++ array containers to numpy.
>> Do you have any small examples?
>>
>
> I think we all are, and the existing numpy/numeric interface is getting
> a bit crufty, and the new numpy type module is somewhat complex :) one
> thing I'm struggling with is my poor understanding of python's internal
> memory management and the like. I'll hopefully have the automatic type
> conversion working in a day or two, and I'll be sure to post my results
> to the list. I'm not trying to do anything fancy like the
> numeric/numarray stuff currently in boost; I just want functions that
> take in const boost::multi_array<T, n> & to handle the conversion for
> me. I want to mostly use my python as a scripting interface on top of
> some number-crunching C++ monte-carlo code.
>
> Interesting questions include: What sort of containers do we use?
> Boost::array? Boost::multiarray? The ublas containers? all of them? Just
> std::vector< std::vector (...) How do we handle the static typing
> problems?
>
Also, I am quite interested in writing generic algorithms that will work
with any of the above. I have mentioned this on boost-devel. Some people
suggested looking at gil. I don't really think that is what I want,
though. Seems rather specific to image processing and image formats.
I'm still interested in a generalization of boost::range to multi-dimensions
for this purpose.
More information about the Cplusplus-sig
mailing list