From c10525e4e62024bbbfec5e2f1a93ee61f9a3acc6 Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:33:25 -0700 Subject: [PATCH] Try using np.errstate = warn --- src/geophires_x/AGSOutputs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/geophires_x/AGSOutputs.py b/src/geophires_x/AGSOutputs.py index 233a4eb8..5b244932 100644 --- a/src/geophires_x/AGSOutputs.py +++ b/src/geophires_x/AGSOutputs.py @@ -52,7 +52,11 @@ def PrintOutputs(self, model: Model): f = scipy.interpolate.interp1d(np.arange(0, len(model.surfaceplant.NetElectricityProduced.value)), model.surfaceplant.NetElectricityProduced.value, fill_value="extrapolate") aranged = np.arange(0, len(model.wellbores.ProducedTemperature.value), 1.0) - model.surfaceplant.NetElectricityProduced.value = f(aranged) + + # FIXME WIP (warn errstate may or may not be appropriate) + with np.errstate(divide='warn'): + 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")