Hi David,<div><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>When I access the attribute in Python with the usual dot operator I get a tuple. What I&#39;d really like though is an object of type &lt;class &#39;scitbx.matrix.col&#39;&gt;, which is what I passed to the constructor of the object in Python.</div>
</blockquote><div><br></div><div>This would be nice indeed but is a little tricky to implement. The C++ wrapper code would need to import scitbx.matrix. It&#39;s entirely possible but I always shied away from introducing this dependency.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I found I had to add</div><div><br></div><div>from cctbx.array_family import flex</div><div><br></div>
<div>to the package __init__.py where my C++ extension is imported,</div></blockquote><div><br></div><div>This import piggy-backs a whole bunch of loosely related from-and-to-tuple conversions; see scitbx/array_family/boost_python/flex_ext.cpp. I had long discussions with Luc about this when he started using cctbx, because from a purists standpoint centralizing all the conversions in flex_ext.cpp breaks modularity. However, the discussions didn&#39;t lead to practical alternatives, and I believe the current solution works well in practice.</div>
<div><br></div><div>Ralf</div><div><br></div></div></div>