From 7ebd688885039562570493aa4ed697b2af728d39 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 29 Nov 2016 14:35:30 -0500 Subject: [PATCH] return type-safe indexrange (for invalid queries) --- lib/damask/asciitable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/damask/asciitable.py b/lib/damask/asciitable.py index 947a5a2e0..771ae76a5 100644 --- a/lib/damask/asciitable.py +++ b/lib/damask/asciitable.py @@ -427,8 +427,8 @@ class ASCIItable(): start = self.label_index(labels) dim = self.label_dimension(labels) - return np.hstack([range(c[0],c[0]+c[1]) for c in zip(start,dim)]) \ - if isinstance(labels, Iterable) and not isinstance(labels, str) \ + return np.hstack([range(s,s+d) for s,d in zip(start,dim)]).astype(int) \ + if isinstance(labels, Iterable) and not isinstance(labels, str) \ else range(start,start+dim) # ------------------------------------------------------------------