<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 Gabor,&nbsp;
<div class=""><br class="">
</div>
<div class="">Thanks for this - seems you’re on the right track here &amp; by commenting out</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">&nbsp; &nbsp; wrap_flex_uint16_t();</div>
<div class="">&nbsp; &nbsp; //wrap_flex_uint32_t();</div>
<div class="">&nbsp; &nbsp; wrap_flex_int64_t();</div>
<div class="">&nbsp; &nbsp; wrap_flex_uint64_t();</div>
<div class=""><br class="">
</div>
<div class="">the errors go away… now I need to figure what is aliasing uint32_t as a size_t is 64 bit … however this has now given me a hook into the mystery</div>
<div class=""><br class="">
</div>
<div class="">Will look some more at this registry and what is going on in here…&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">Much thanks for this assistance!</div>
<div class=""><br class="">
</div>
<div class="">All the best Graeme</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 30 Sep 2020, at 09:59, Gabor Bunkoczi &lt;<a href="mailto:gabor.bunkoczi@googlemail.com" class="">gabor.bunkoczi@googlemail.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi Graeme,
<div class=""><br class="">
</div>
<div class="">I am not sure how useful this is going to be, but here are two strategies to deal with this scenario:</div>
<div class=""><br class="">
</div>
<div class="">1. You can query the Python converter&nbsp;registry to see that a converter&nbsp;for a particular type has been registered, e.g. as it is done here:</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://github.com/cctbx/cctbx_project/blob/fcff45919ee0b5cdf9f12cc9ea9d2f9efa9a0681/boost_adaptbx/boost_range_python.hpp#L23" class="">https://github.com/cctbx/cctbx_project/blob/fcff45919ee0b5cdf9f12cc9ea9d2f9efa9a0681/boost_adaptbx/boost_range_python.hpp#L23</a></div>
<div class="">&nbsp;</div>
<div class="">This is useful when you want to export something with a particular name, but share the implementation with something pre-existing (e.g. size_t being uint64).</div>
<div class=""><br class="">
</div>
<div class="">2. You can uniquify the types you are exporting, e.g. as it is done here :</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://github.com/cctbx/cctbx_project/blob/fcff45919ee0b5cdf9f12cc9ea9d2f9efa9a0681/boost_adaptbx/exporting.hpp#L56" class="">https://github.com/cctbx/cctbx_project/blob/fcff45919ee0b5cdf9f12cc9ea9d2f9efa9a0681/boost_adaptbx/exporting.hpp#L56</a><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">This is useful when you want to export a unique list, but the uniqueness&nbsp;depends on e.g. the architecture, as for size_t.</div>
<div class=""><br class="">
</div>
<div class="">Unfortunately, these are only useful when exports are centralised, as unconditional class_ statements will cause the same warning to be emitted.</div>
<div class=""><br class="">
</div>
<div class="">BW, Gabor</div>
<div class=""><br class="">
</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Sep 30, 2020 at 6:30 AM Winter, Graeme (DLSLtd,RAL,LSCI) &lt;<a href="mailto:Graeme.Winter@diamond.ac.uk" class="">Graeme.Winter@diamond.ac.uk</a>&gt; wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;" class="">&lt;bump&gt;
<div class=""><br class="">
</div>
<div class="">Does anyone know about this stuff or am I on my own here?</div>
<div class=""><br class="">
</div>
<div class="">Alternative of using numpy arrays to do the job has been suggested but would prefer keeping in the cctbx ecosystem</div>
<div class=""><br class="">
</div>
<div class="">Thanks Graeme<br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 28 Sep 2020, at 07:15, Winter, Graeme (DLSLtd,RAL,LSCI) &lt;<a href="mailto:graeme.winter@diamond.ac.uk" target="_blank" class="">graeme.winter@diamond.ac.uk</a>&gt; wrote:</div>
<br class="">
<div class="">
<div style="overflow-wrap: break-word;" class="">Hi All,
<div class=""><br class="">
</div>
<div class="">In the branch&nbsp;</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://github.com/cctbx/cctbx_project/tree/fixed-width-int-types" target="_blank" class="">https://github.com/cctbx/cctbx_project/tree/fixed-width-int-types</a></div>
<div class=""><br class="">
</div>
<div class="">I am working to add a full range of fixed-width integer types to allow explicit reading of binary data without conversion from images (amongst other things) - mostly I’ve got something _working_ but tests fail because stdout / err contains</div>
<div class=""><br class="">
</div>
<div class="">&nbsp;&nbsp;Standard error:<br class="">
&nbsp; &nbsp;&nbsp;/Users/graeme/svn/cctbx/conda_base/python.app/Contents/lib/python3.6/importlib/_bootstrap.py:219:&nbsp;RuntimeWarning: to-Python converter for scitbx::af::shared&lt;unsigned int&gt; already registered; second&nbsp;conversion method ignored.</div>
<div class=""><br class="">
</div>
<div class="">has anyone got any hints where these may be registered?</div>
<div class=""><br class="">
</div>
<div class="">The details of the low level flex implementation seems to be minimally documented, and the error has no useful stack trace, so I am at a bit of a loss as to where the other unsigned int conversion is registered.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">Some pointers from someone who has delved into these in the past would be welcome - I have spent a couple days trying to find what I am doing wrong and have so far failed - hopefully someone on the list knows their way around in here</div>
<div class=""><br class="">
</div>
<div class="">Cheers Graeme</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
<div class="">&nbsp;<br class="webkit-block-placeholder">
</div>
<p align="justify" class="">--&nbsp;</p>
<p align="justify" class="">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 class="">
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
<br class="">
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 class="">
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 class="">
&nbsp;</p>
</div>
_______________________________________________<br class="">
cctbxbb mailing list<br class="">
<a href="mailto:cctbxbb@phenix-online.org" target="_blank" class="">cctbxbb@phenix-online.org</a><br class="">
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank" class="">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br class="">
</blockquote>
</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>