[SciPy-dev] Changing return types in C API
Philip Austin
paustin at eos.ubc.ca
Wed Feb 1 17:13:20 CST 2006
David M. Cooke writes:
> ArrayObject<double> a = contiguous_from_any<double>(obj, 1, 1);
> double *d = ao.data();
>
> Or something like that; this is untested code. But using template
> specialization like this could cut down a lot of casting, and make
> things safer in C++. Plus you could add refcount handling and all
> that :-)
On this topic: I've just about finished testing our
boost:::python::numeric helper functions
(http://www.eos.ubc.ca/research/clouds/num_util.html)
with numpy. The only change required was
a new free function to replace array.typecode(). Once
I finish the cleanup and a couple of new examples I'll post the link
to the topical software page with a short description.
Regards, Phil
More information about the Scipy-dev
mailing list