From 56042efd981ce7d3e0815055e6ee3b64b08034fb Mon Sep 17 00:00:00 2001 From: John Evans Date: Sun, 28 Sep 2014 12:43:57 -0400 Subject: [PATCH] use round rather than floor --- glymur/jp2k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glymur/jp2k.py b/glymur/jp2k.py index f1b9818..b721742 100644 --- a/glymur/jp2k.py +++ b/glymur/jp2k.py @@ -833,7 +833,7 @@ class Jp2k(Jp2kBox): step = rows_step # Check if the step size is a power of 2. - if np.abs(np.log2(step) - np.floor(np.log2(step))) > 1e-6: + if np.abs(np.log2(step) - np.round(np.log2(step))) > 1e-6: msg = "Row and column strides must be powers of 2." raise IndexError(msg) rlevel = np.int(np.round(np.log2(step)))