fixed bug preventing first line to be read when using readArray without labels.

This commit is contained in:
Philip Eisenlohr 2015-07-09 03:40:15 +00:00
parent 7a4415b28a
commit c46e639a38
1 changed files with 1 additions and 5 deletions

View File

@ -124,10 +124,6 @@ class ASCIItable():
except(IOError): except(IOError):
pass pass
if self.__IO__['validReadSize'] == 0: # in case no valid data length is known
self.data_read(advance = False)
self.__IO__['validReadSize'] = len(self.data) # assume constant data width from first line
# ------------------------------------------------------------------ # ------------------------------------------------------------------
def head_write(self): def head_write(self):
''' '''
@ -336,7 +332,7 @@ class ASCIItable():
if not isinstance(labels,list): if not isinstance(labels,list):
labels = [labels] labels = [labels]
if labels == [None] or labels == []: if labels == [None] or labels == []:
use = np.arange(self.__IO__['validReadSize']) # use all columns (and keep labels intact) use = None # use all columns (and keep labels intact)
labels_missing = [] labels_missing = []
else: else:
indices = self.label_index(labels) # check requested labels indices = self.label_index(labels) # check requested labels