ts_data = np.loadtxt(f, delimiter=sep)
ts_data = ts_data[:, :3] // Only using T, M, E
for row in ts_data:
if len(row) < 2:
raise custom_exceptions.DataFormatError(
"Incomplete or improperly formatted time "
"series data file provided.")
After Change
raise custom_exceptions.DataFormatError(Incomplete or improperly
formatted time series data file
provided.)
elif ts_data.shape[1] == 1:
ts_data = np.c_[np.linspace(0, cfg.DEFAULT_MAX_TIME, len(ts_data)),
ts_data,
np.repeat(cfg.DEFAULT_ERROR_VALUE, len(ts_data))]
elif ts_data.shape[1] == 2:
ts_data = np.c_[ts_data,
np.repeat(cfg.DEFAULT_ERROR_VALUE, len(ts_data))]
return ts_data.T