Re: [cython-users] Cannot convert 'Rfd *' to Python object

24 views
Skip to first unread message
Message has been deleted

Darsh Ranjan

unread,
Oct 31, 2016, 12:59:11 PM10/31/16
to cython...@googlegroups.com
> # NoLimitOrionPdfCurve
> cdef extern from "pdf_curve/PdfCurves/src/NoLimitOrionPdfCurve.h":
> cpdef cppclass NoLimitOrionPdfCurve:
> NoLimitOrionPdfCurve()
> void createCurve(PyRfd rfd, vector[double]);


> void NoLimitOrionPdfCurve::createCurve(const Rfd& pData, const vector<double>& weights)

The cdef declaration should match the C++ declaration. In particular,
the C++-defined createCurve method accepts a const reference to an Rfd
instance, not a PyRfd instance (which it has no knowledge of).

In other words:

# NoLimitOrionPdfCurve
cdef extern from "pdf_curve/PdfCurves/src/NoLimitOrionPdfCurve.h":
cpdef cppclass NoLimitOrionPdfCurve:
NoLimitOrionPdfCurve()
void createCurve(const Rfd& rfd, const vector[double]&);

Mingjie Su

unread,
Oct 31, 2016, 2:58:20 PM10/31/16
to cython-users, darsh....@here.com
Thanks a lot for your help!
Reply all
Reply to author
Forward
0 new messages