From 58c2a61d7e6462d9b48b77a93678e7f4b4deebe7 Mon Sep 17 00:00:00 2001 From: Joseph Ramsay <joseph.ramsay@stfc.ac.uk> Date: Thu, 5 Oct 2017 16:51:17 +0100 Subject: [PATCH] Re #20774 Removed integer division error in LineProfile doctest --- docs/source/algorithms/LineProfile-v1.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/algorithms/LineProfile-v1.rst b/docs/source/algorithms/LineProfile-v1.rst index 963da14b0f8..7e6b73a9aca 100644 --- a/docs/source/algorithms/LineProfile-v1.rst +++ b/docs/source/algorithms/LineProfile-v1.rst @@ -144,17 +144,17 @@ Output: sumCutWS = LineProfile(wsInTheta, centre, width, Mode='Sum') # When no NaNs are present both modes give the same result. - iElastic = sumCutWS.blocksize() / 2 + iElastic = sumCutWS.blocksize() // 2 y = sumCutWS.readY(0)[iElastic] e = sumCutWS.readE(0)[iElastic] - print('Sum profile at elastic peak: {} +/- {}'.format(y, e)) + print('Sum profile at elastic peak: {:.8f} +/- {:.10f}'.format(y, e)) # The weighting is apparent when the profile crosses some # special values. - iEdge = sumCutWS.blocksize() / 6 + iEdge = sumCutWS.blocksize() // 6 y = sumCutWS.readY(0)[iEdge] e = sumCutWS.readE(0)[iEdge] - print('Sum profile near NaNs: {} +/- {}'.format(y, e)) + print('Sum profile near NaNs: {:.11f} +/- {:.11f}'.format(y, e)) .. testoutput:: SumMode -- GitLab