[C++-sig] strange registry behavior

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Mon Dec 18 19:54:54 CET 2006


Hi Jonathan,

> >>> baz = foo + bar
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/home/jwang1/eqvol/Analytic2/python/vector.py", line 75, in __add__
>     return Vector(extract.getResult(calc))
> TypeError: No Python class registered for C++ class std::vector<double, std::allocator<double> >

It is difficult to help.
What is Vector? A Python class?
What is extract?
What is calc?
Does this fail?
  r = extract.getResult(calc)
Or this?
  Vector(r)

BTW: The facilities in container_conversions.h were designed for small
arrays (say sizes < 10). The conversions from/to Python objects will be
rate-limiting for bigger arrays.

Cheers,
        Ralf




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Cplusplus-sig mailing list