return type-safe indexrange (for invalid queries)
This commit is contained in:
parent
231f05e142
commit
7ebd688885
|
@ -427,7 +427,7 @@ 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)]) \
|
||||
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue