Closed APMonitor closed 2 years ago
Bug is fixed with a modification to gk_write_files.py
to detect ndim==1
:
if csv_data.ndim==1:
# with only one variable
hdr = csv_data[0]
else:
# with multiple variables
hdr = csv_data[0,0]
for i in range(1,np.size(csv_data,0)):
hdr += ','+csv_data[i,0]
np.savetxt(os.path.join(self._path,file_name), csv_data[:,1:].T,\
delimiter=",",comments='',header=hdr,fmt='%1.25s')
self.csv_status = 'generated'
A recent fix for long variable names (>=25 characters) introduced another bug. The problem is when there is one variable in a problem and the variable is initialized. This breaks v1.0.0 Gekko but not older versions: