You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
thermo_add.py crashes with NumPy 2.x and OpenMDAO 3.42+ #116
ThermoAdd.compute() raises a TypeError at line 121 due to two breaking changes:
OpenMDAO 3.42.0 stores scalar inputs as (1,) arrays instead of scalars
NumPy 2.0 removed implicit float() conversion on 1-element arrays
The crash: W_other_out[self.idx_compo] += W_other_mix on line 121 causes the following TypeErrors:
TypeError: 'DESIGN.burner.mix_fuel.thermo_add' <class ThermoAdd>: Error calling compute(), only 0-dimensional arrays can be converted to Python scalars
File "C:\Users\REDACTED_FILEPATH\pycycle\thermo\tabular\thermo_add.py", line 121, in compute
W_other_out[self.idx_compo] += float(W_other_mix)
^^^^^^^^^^^^^^^^^^
TypeError: only 0-dimensional arrays can be converted to Python scalars
Fix: change line 121 in thermo_add.py to W_other_out[self.idx_compo] += W_other_mix.item()
Activity
Updated thermo_add.py line 121 to be compatible with OpenMDAO 3.42.0 …
stefano2734 commentedon Mar 11, 2026
New releases Numpy 2.4.3 and openMDao 2.4.3
Should be Equal or perhaps more to do here?
Jhawk414 commentedon Mar 12, 2026
I'm not sure I understand your question.
However, OpenMDAO release 3.43.0 was released today (11 March 2026) and I haven't had a chance to see if this issue is affected.
Add hangar-pyc: pyCycle gas turbine cycle analysis MCP server
stefano2734 commentedon Apr 30, 2026
Sometimes new version errors are solved in next version. NumPy 2.44 is also now available.
And sometimes a permanent change is the source of failure.
flight-test-engineering commentedon May 7, 2026
@Jhawk414 , are you going to open a PR with your fix?
Jhawk414 commentedon May 13, 2026
Yep. As shown I've created PR #117 to address this. One line fix
Updated thermo_add.py line 121 to be compatible with OpenMDAO 3.42.0 …