parameters: (self)
docstring: Process/read the data file.
docstring_summary: Process/read the data file.
docstring_tokens: Process / read the data file .
function: def load(self):
          """Process/read the data file."""
          # this will determine number of leading rows and extract labels etc...
          self._extractheader()
  
          with open(self.filename, 'r') as f:
              # skip some rows as determined by _extractheader()
              for _ in range(self.skiprows):
                  f.next()
  
              # build a 2D list where each row is a line from the file
              currentshot = 0
              for line in f:
                  # convert to int so we can use
                  datarow_str = line.strip().split()
                  datarow = [int(d) for d in datarow_str if len(d) > 0]
  
                  # normal case is that we have data without shotid, so add it
                  if len(datarow) < len(self.labels):
                      datarow.insert(0, currentshot)
                  else:
                      currentshot = datarow[0]
  
                  self.alldata.append(datarow)
  
          # convert it all to numpy array for easier manipulation later
          self.alldata = np.asarray(self.alldata)
function_tokens: def load ( self ) : # this will determine number of leading rows and extract labels etc... self . _extractheader ( ) with open ( self . filename , 'r' ) as f : # skip some rows as determined by _extractheader() for _ in range ( self . skiprows ) : f . next ( ) # build a 2D list where each row is a line from the file currentshot = 0 for line in f : # convert to int so we can use datarow_str = line . strip ( ) . split ( ) datarow = [ int ( d ) for d in datarow_str if len ( d ) > 0 ] # normal case is that we have data without shotid, so add it if len ( datarow ) < len ( self . labels ) : datarow . insert ( 0 , currentshot ) else : currentshot = datarow [ 0 ] self . alldata . append ( datarow ) # convert it all to numpy array for easier manipulation later self . alldata = np . asarray ( self . alldata )