From 39a06353f6674bfd90631334dadef581d5be4725 Mon Sep 17 00:00:00 2001 From: ryanm Date: Thu, 10 Sep 2026 22:50:17 -0600 Subject: [PATCH] sync: use .item() for ThermoAdd:W output to match upstream PR #117 Aligns the vendored thermo_add.py with OpenMDAO/pyCycle#117, which applied the NumPy 2.x scalar-extraction fix to both the output assignment and the idx_compo accumulation. This repo already had the functional fix on the accumulation line from an earlier local commit; this brings the adjacent output line in line with upstream style. Closes #6 --- pycycle/thermo/tabular/thermo_add.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pycycle/thermo/tabular/thermo_add.py b/pycycle/thermo/tabular/thermo_add.py index bc863f3a..d094baa1 100644 --- a/pycycle/thermo/tabular/thermo_add.py +++ b/pycycle/thermo/tabular/thermo_add.py @@ -117,7 +117,7 @@ def compute(self, inputs, outputs): W_air_mix = W_air_in # for reactant mode, we reference from the incoming air W_other_mix = W_air_mix * ratio - outputs[f'{mix_name}:W'] = W_other_mix + outputs[f'{mix_name}:W'] = W_other_mix.item() W_other_out[self.idx_compo] += W_other_mix.item() W_out += W_other_mix W_times_h += W_other_mix*inputs[f'{mix_name}:h']