fixed error for completely empty label list in read_array
This commit is contained in:
parent
535f8be76a
commit
6bdce9b332
|
@ -501,10 +501,10 @@ class ASCIItable():
|
||||||
columns = []
|
columns = []
|
||||||
for i,(c,d) in enumerate(zip(indices[present],dimensions[present])): # for all valid labels ...
|
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
|
# ... transparently add all components unless column referenced by number or with explicit dimension
|
||||||
columns += range(c,c + \
|
columns += range(c,c +
|
||||||
(d if str(c) != str(labels[present[i]]) else \
|
(d if str(c) != str(labels[present[i]]) else
|
||||||
1))
|
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
|
self.tags = list(np.array(self.tags)[use]) # update labels with valid subset
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue