From 332ab0449be9bff38c2edece247a1f09ef5a28de Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Tue, 14 May 2013 13:15:29 +1000 Subject: [PATCH] Improve PEP8 and Python 3 compliance Thanks to @JDWarner and @ahojnnes for the input. --- skimage/util/regular_grid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skimage/util/regular_grid.py b/skimage/util/regular_grid.py index 40980491..ab1b12dc 100644 --- a/skimage/util/regular_grid.py +++ b/skimage/util/regular_grid.py @@ -1,5 +1,6 @@ import numpy as np + def regular_grid(ar_shape, n_points): """Find `n_points` regularly spaced along `ar_shape`. @@ -36,7 +37,7 @@ def regular_grid(ar_shape, n_points): (1.0 / (ndim - dim - 1))) if (sorted_dims >= stepsizes).all(): break - starts = np.floor(stepsizes/2) + starts = stepsizes // 2 stepsizes = np.round(stepsizes) slices = [slice(start, None, step) for start, step in zip(starts, stepsizes)]