From ef186f8b4dd1d1785c12adbad1cc3fa393f9f731 Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Tue, 6 Aug 2019 07:59:39 -0500 Subject: [PATCH 1/3] fixes #176 --- awkward/array/jagged.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awkward/array/jagged.py b/awkward/array/jagged.py index dcb1ec30..a137c897 100644 --- a/awkward/array/jagged.py +++ b/awkward/array/jagged.py @@ -1576,8 +1576,12 @@ def _argminmax(self, ismin): else: out = self.localindex[self.max() == self] + print("out", out.tolist()) + # workaround for lack of general out[...,:1] support nonempty = out.counts > 0 + if self.offsetsaliased(out._starts, out._stops): + out.stops = out.stops.copy() out.stops[nonempty] = out.starts[nonempty] + 1 return out From 8df900dc6e4fa8af926a2ecf59225780b3712b3a Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Tue, 6 Aug 2019 08:00:12 -0500 Subject: [PATCH 2/3] remove debugging code --- awkward/array/jagged.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/awkward/array/jagged.py b/awkward/array/jagged.py index a137c897..46450bf1 100644 --- a/awkward/array/jagged.py +++ b/awkward/array/jagged.py @@ -1576,8 +1576,6 @@ def _argminmax(self, ismin): else: out = self.localindex[self.max() == self] - print("out", out.tolist()) - # workaround for lack of general out[...,:1] support nonempty = out.counts > 0 if self.offsetsaliased(out._starts, out._stops): From f1bffc1439da2c0c0f409cf6c87c1e09e5dbc3e5 Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Tue, 6 Aug 2019 08:08:05 -0500 Subject: [PATCH 3/3] bump version number --- awkward/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awkward/version.py b/awkward/version.py index dcb0899c..3f3b0d55 100644 --- a/awkward/version.py +++ b/awkward/version.py @@ -4,7 +4,7 @@ import re -__version__ = "0.12.5" +__version__ = "0.12.6" version = __version__ version_info = tuple(re.split(r"[-\.]", __version__))