def getData(self): # check if a separator is a white space if is_empty(self.params.separator): _data = pl.loadtxt(self._file, dtype=(str), skiprows=self.headers_count, unpack=True) else: _data = pl.loadtxt(self._file, dtype=(str), skiprows=self.headers_count, unpack=True, delimiter=self.params.separator) #some issues with preparing data, details in prepare_data_arrays func. return prepare_data_arrays(self._file, self.headers_count, _data)
def getData(self): # check if a separator is a white space if is_empty(self.params.separator): _data = pl.loadtxt(self._file, skiprows=self.headers_count, unpack=True) else: try: _data = pl.loadtxt(self._file, skiprows=self.headers_count, unpack=True, delimiter=self.params.separator) except ValueError: #try to load without a separator _data = pl.loadtxt(self._file, skiprows=self.headers_count, unpack=True) #some issues with preparing data, details in prepare_data_arrays func. return prepare_data_arrays(self._file, self.headers_count, _data)