On 12/18/06, <b class="gmail_sendername">Ralf W. Grosse-Kunstleve</b> &lt;<a href="mailto:rwgk@yahoo.com">rwgk@yahoo.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi Jonathan,<br><br>&gt; &gt;&gt;&gt; baz = foo + bar<br>&gt; Traceback (most recent call last):<br>&gt;&nbsp;&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in ?<br>&gt;&nbsp;&nbsp; File &quot;/home/jwang1/eqvol/Analytic2/python/vector.py&quot;, line 75, in __add__
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; return Vector(extract.getResult(calc))<br>&gt; TypeError: No Python class registered for C++ class std::vector&lt;double, std::allocator&lt;double&gt; &gt;<br><br>It is difficult to help.<br>What is Vector? A Python class?
<br>What is extract?<br>What is calc?<br>Does this fail?<br>&nbsp;&nbsp;r = extract.getResult(calc)<br>Or this?<br>&nbsp;&nbsp;Vector(r)</blockquote><div><br>Nevermind... I figured this out. The vector was getting returned with return_internal_reference call policy, which requires a class to be registered, not just a result converter. Switching the call policy fixed things.
<br><br>Thanks,<br>Jonathan<br></div><br></div>