-
Notifications
You must be signed in to change notification settings - Fork 4
Description
In some situations, e.g., the testProject run on lates Python and Anaconda libs, an issue with the Scipy.Interpolate.interp1d funtion inputs (coming from Demand.py, L85) can arise. The resulting error is ValueError: x and y arrays must be equal in length along interpolation axis.
The reason for the error is that the testProject inputs as imported generate variables time and loadP of shape (604800,1), but (604800,) is expected. Suggested fix is to insert (tested for interp1d, but not tested in subsequent MiGRIDS code):
time = np.squeeze(time)
loadP = np.squeeze(loadP)
The same should happen anywhere else interp1d is used to ensure that changes in upstream data handling, e.g., interpretation of data coming from netCDF files or DB is does not cause a problem. Ideally, squeeze is used once during data intake, instead of down in the various component objects.