[C++-sig] No registered converter was able to produce a C++ rvalue...
Neal Becker
ndbecker2 at gmail.com
Wed Oct 10 20:54:25 CEST 2007
I know this comes up frequently, but this one has me baffled.
u = array1_complex_int ((1,2))
TypeError: No registered converter was able to produce a C++ rvalue of type
std::complex<int> from this Python object of type int
But there is a converter, it can be invoked from the python side:
>>> complex_int (2)
<blitz.complex_int object at 0x2aaaaab69db8>
or like this:
u = array1_complex_int (complex_int(e) for e in (1,2))
It seems that extract<std::complex<int> > is not finding the conversion.
Any hints?
The conversion is there, because there is this minimal class_:
bp::class_<std::complex<int> > ("complex_int", bp::init<int,optional<int>
>())
;
More information about the Cplusplus-sig
mailing list