sync: align ThermoAdd with upstream .item() fix (PR #117) - #9
Merged
Merged
Conversation
…O#117 Aligns the vendored thermo_add.py with OpenMDAO#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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings
pycycle/thermo/tabular/thermo_add.pyin line with OpenMDAO/pyCycle#117, which fixed a NumPy 2.x / OpenMDAO 3.42+ incompatibility inThermoAdd.compute().This fork already carried the functional half of the fix (
W_other_out[self.idx_compo] += W_other_mix.item()) from an earlier local commit addressing pyCycle issue OpenMDAO#116. The remaining line,outputs[f'{mix_name}:W'] = W_other_mix, wasn't actually broken (assigning to a shape-(1,)output doesn't hit the broadcast error), but upstream changed it for consistency in OpenMDAO#117. This PR applies the same.item()change here so the vendored file matches upstream's current style on both lines.A broader audit for other upstream fixes accumulated since this fork diverged is left as follow-up, not included here.
Related Issues
Backwards incompatibilities
None
New Dependencies
None