From 4b02a55f4d34f45986ccf9e3e9312eb6e9d86b1f Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 30 Aug 2016 16:08:47 -0400 Subject: [PATCH] explicit type casting from boolean to int --- processing/post/vtk_rectilinearGrid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/processing/post/vtk_rectilinearGrid.py b/processing/post/vtk_rectilinearGrid.py index 73a64c4aa..dfe376b3f 100755 --- a/processing/post/vtk_rectilinearGrid.py +++ b/processing/post/vtk_rectilinearGrid.py @@ -79,9 +79,9 @@ for name in filenames: coords = [np.unique(table.data[:,i]) for i in xrange(3)] if options.mode == 'cell': - coords = [0.5 * np.array([3.0 * coords[i][0] - coords[i][0 + len(coords[i]) > 1]] + \ + coords = [0.5 * np.array([3.0 * coords[i][0] - coords[i][0 + int(len(coords[i]) > 1)]] + \ [coords[i][j-1] + coords[i][j] for j in xrange(1,len(coords[i]))] + \ - [3.0 * coords[i][-1] - coords[i][-1 - (len(coords[i]) > 1)]]) for i in xrange(3)] + [3.0 * coords[i][-1] - coords[i][-1 - int(len(coords[i]) > 1)]]) for i in xrange(3)] grid = np.array(map(len,coords),'i') N = grid.prod() if options.mode == 'point' else (grid-1).prod()