From c0f3c68703629834cb0f852df7c7554bcee37b54 Mon Sep 17 00:00:00 2001 From: Ross Whitfield <whitfieldre@ornl.gov> Date: Mon, 19 Jun 2017 11:04:13 -0400 Subject: [PATCH] Fix Boolean indexing for numpy 1.13 Boolean indexes must match the dimension of the axis that they index. See https://docs.scipy.org/doc/numpy-1.13.0/release.html#boolean-indexing-changes --- scripts/test/ConvertToWavelengthTest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/ConvertToWavelengthTest.py b/scripts/test/ConvertToWavelengthTest.py index a07407479eb..284241aca53 100644 --- a/scripts/test/ConvertToWavelengthTest.py +++ b/scripts/test/ConvertToWavelengthTest.py @@ -115,7 +115,7 @@ class ConvertToWavelengthTest(unittest.TestCase): def cropped_x_range(cls, ws, index): det_ws_x = ws.readX(index) mask = ws.readY(index) != 0 # CropWorkspace will only zero out y values! so we need to translate those to an x range - cropped_x = det_ws_x[mask] + cropped_x = det_ws_x[:-1][mask] return cropped_x[0], cropped_x[-1] def test_convert(self): -- GitLab