fixed error for completely empty label list in read_array

This commit is contained in:
Philip Eisenlohr 2016-08-11 14:22:07 -04:00
parent 535f8be76a
commit 6bdce9b332
1 changed files with 3 additions and 3 deletions

View File

@ -501,10 +501,10 @@ class ASCIItable():
columns = []
for i,(c,d) in enumerate(zip(indices[present],dimensions[present])): # for all valid labels ...
# ... transparently add all components unless column referenced by number or with explicit dimension
columns += range(c,c + \
(d if str(c) != str(labels[present[i]]) else \
columns += range(c,c +
(d if str(c) != str(labels[present[i]]) else
1))
use = np.array(columns)
use = np.array(columns) if len(columns) > 0 else None
self.tags = list(np.array(self.tags)[use]) # update labels with valid subset