<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi George
<div class=""><br class="">
</div>
<div class="">I’ve been caught out by this kind of thing on dozens of occasions and it is usually something like an accessor function (liberally scattering .as_1d() often helps)</div>
<div class=""><br class="">
</div>
<div class="">If you could send the code block where the error manifests (to give some context to the stack trace) that would probably help</div>
<div class=""><br class="">
</div>
<div class="">Best wishes Graeme&nbsp;<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 17 Feb 2020, at 19:12, georgep &lt;<a href="mailto:georgep@rice.edu" class="">georgep@rice.edu</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
I am starting to write some python code using cctbx, but am missing how to use the C&#43;&#43; bindings.
<div class="">I am fine unless a try to access them. &nbsp;Something about my environment or boost of something.</div>
<div class="">Can anyone point me in the right direction?</div>
<div class=""><br class="">
</div>
<div class="">I have&nbsp;</div>
<div class="">
<pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-size:9.0pt;" class=""><span style="color:#cc7832;" class="">import </span>boost.python</pre>
<div class="">but am cleary missing some fundamental knowledge.</div>
</div>
<div class=""><br class="">
</div>
<div class="">George</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">Traceback (most recent call last):</div>
<div class="">&nbsp; File &quot;/Users/georgep/PycharmProjects/test_env/HIO_Version3.py&quot;, line 225, in &lt;module&gt;</div>
<div class="">&nbsp; &nbsp; S0 = percentile[rho_calc_true &gt; percentile(rho_calc_true, solv_frac)] = 1</div>
<div class="">&nbsp; File &quot;/Users/georgep/PycharmProjects/test_env/HIO_Version3.py&quot;, line 216, in percentile</div>
<div class="">&nbsp; &nbsp; order = flex.sort_permutation(x)</div>
<div class="">Boost.Python.ArgumentError: Python argument types in</div>
<div class="">&nbsp; &nbsp; scitbx_array_family_flex_ext.sort_permutation(double)</div>
<div class="">did not match C&#43;&#43; signature:</div>
<div class="">&nbsp; &nbsp; sort_permutation(scitbx::af::const_ref&lt;double, scitbx::af::trivial_accessor&gt; data, bool reverse=False, bool stable=True)</div>
<div class="">&nbsp; &nbsp; sort_permutation(scitbx::af::const_ref&lt;unsigned long, scitbx::af::trivial_accessor&gt; data, bool reverse=False, bool stable=True)</div>
<div class="">&nbsp; &nbsp; sort_permutation(scitbx::af::const_ref&lt;int, scitbx::af::trivial_accessor&gt; data, bool reverse=False, bool stable=True)</div>
<div class=""><br class="">
</div>
<div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
George N. Phillips, Jr.<br class="">
Ralph and Dorothy Looney Professor<br class="">
BioSciences at Rice<br class="">
Rice University, MS140<br class="">
6100 Main Street<br class="">
Houston, Texas &nbsp;77005-1892<br class="">
Office: &#43;1 713.348.6951</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span style="text-align: -webkit-auto;" class=""><a href="http://www.phillipslab.org/" class="">www.phillipslab.org</a></span><br class="">
<br class="">
<br class="">
</div>
</span></div>
</div>
</div>
<br class="">
</div>
</div>
_______________________________________________<br class="">
cctbxbb mailing list<br class="">
<a href="mailto:cctbxbb@phenix-online.org" class="">cctbxbb@phenix-online.org</a><br class="">
http://phenix-online.org/mailman/listinfo/cctbxbb<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<p align="justify">&nbsp;</p>
<p align="justify">--&nbsp;</p>
<p align="justify">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.<br />Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. <br />Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.<br />Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom<br />&nbsp;</p></body>
</html>