Skip to content

Commit

Permalink
Store arange in separate variable first
Browse files Browse the repository at this point in the history
  • Loading branch information
softwareengineerprogrammer committed Oct 4, 2023
1 parent 221b816 commit 3e4464b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/geophires_x/AGSOutputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def PrintOutputs(self, model: Model):
if len(model.surfaceplant.NetElectricityProduced.value) != len(model.wellbores.ProducedTemperature.value):
f = scipy.interpolate.interp1d(np.arange(0, len(model.surfaceplant.NetElectricityProduced.value)),
model.surfaceplant.NetElectricityProduced.value, fill_value="extrapolate")
model.surfaceplant.NetElectricityProduced.value = f(np.arange(0, len(model.wellbores.ProducedTemperature.value), 1.0))
aranged = np.arange(0, len(model.wellbores.ProducedTemperature.value), 1.0)
model.surfaceplant.NetElectricityProduced.value = f(aranged)
if len(model.surfaceplant.FirstLawEfficiency.value) != len(model.wellbores.ProducedTemperature.value):
f = scipy.interpolate.interp1d(np.arange(0, len(model.surfaceplant.FirstLawEfficiency.value)),
model.surfaceplant.FirstLawEfficiency.value, fill_value="extrapolate")
Expand Down

0 comments on commit 3e4464b

Please sign in to comment.