<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Would not shifting by 360 and dividing by 2 do the job?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Oleg.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> cctbxbb-bounces@phenix-online.org &lt;cctbxbb-bounces@phenix-online.org&gt; on behalf of Robert Oeffner &lt;rdo20@cam.ac.uk&gt;<br>
<b>Sent:</b> 11 April 2019 17:46<br>
<b>To:</b> cctbxbb@phenix-online.org<br>
<b>Subject:</b> [cctbxbb] modulo operation on flex.double</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
I have a flex.double array of phase values between -360 and 360 degrees <br>
I would like to cast them all in one go to lie within 0 to 360. Does <br>
anybody know if there is a nice way of doing this with flex arrays? The <br>
modulo operator doesn't seem to be supported for flex arrays unlike the <br>
&#43;, -, * and the / operators. This would otherwise be handy as I could <br>
then convert the array in one line of code like<br>
<br>
phases = phases % 360.0<br>
<br>
If not I guess I'll have to numpy the problem :-)<br>
<br>
Many thanks,<br>
<br>
Rob<br>
<br>
<br>
_______________________________________________<br>
cctbxbb mailing list<br>
cctbxbb@phenix-online.org<br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</div>
</span></font></div>
</body>
</html>