From 14e428b1ae4f5977cc84002bf755740120e64cbf Mon Sep 17 00:00:00 2001 From: jevans Date: Sun, 5 Oct 2014 20:23:19 -0400 Subject: [PATCH] removed unneeded block of code Checking for ints in the argument tuple was being done twice. --- glymur/jp2k.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/glymur/jp2k.py b/glymur/jp2k.py index 00911d2..7b9954e 100644 --- a/glymur/jp2k.py +++ b/glymur/jp2k.py @@ -793,19 +793,6 @@ class Jp2k(Jp2kBox): # Should have a slice object where start = stop = step = None return self.read() - if isinstance(pargs, tuple) and all(isinstance(x, int) for x in pargs): - # Retrieve a single pixel. - # Something like jp2[r, c] - row = pargs[0] - col = pargs[1] - area = (row, col, row + 1, col + 1) - pixel = self.read(area=area).squeeze() - - if len(pargs) == 2: - return pixel - elif len(pargs) == 3: - return pixel[pargs[2]] - if isinstance(pargs, tuple) and any(x is Ellipsis for x in pargs): nrows = codestream.segment[1].ysiz ncols = codestream.segment[1].xsiz