How to use a Python function that returns a double array in C++.

Hrvoje Niksic hniksic at xemacs.org
Wed Dec 3 10:17:20 CET 2008


pieter <pietersteenekamp at gmail.com> writes:

> I want to use a Python function that returns a double array in C++.

Return an array.array('d') object, and use the buffer protocol (for
example PyObject_AsReadBuffer()) to get the address of the underlying
array of native doubles.



More information about the Python-list mailing list