[C++-sig] extracting a numpy.int32 type
Ger van Diepen
diepen at astron.nl
Wed Dec 9 16:29:19 CET 2009
Hi Nathan,
We have converters written at the end of 2006. We never needed to convert them to the more powerful newer versions of Boost-Python as they still build fine. So they might look outdated.
They can convert scalars, sequences, dicts, and numpy arrays of many types, also all numeric numpy types. So it can convert, say, an element of a numpy int32 array to a C++ float scalar. Vice-versa a C++ numeric value is always converted to a regular Python numeric type.
They work well on both 32bit and 64bit platforms.
If you want to see more you can find the code at pyrap.googlecode.com.
Cheers,
Ger
More information about the Cplusplus-sig
mailing list