List Info

Thread: No registered converter was able to produce a C++ rvalue...




No registered converter was able to produce a C++ rvalue...
country flaguser name
United States
2007-10-10 13:54:25
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>
>())
    ;


_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )