Skip to content

Conversation

@RHammond2
Copy link
Collaborator

@RHammond2 RHammond2 commented Jan 28, 2026

Flatten matrix-shaped arrays to 1D arrays for c_double casting

This PR is addressing the test failures cropping up in #509 caused by passing a (N, 1) NumPy array to a (N,) c_double array. By reshaping the NumPy arrays to shape (N,) the issue is resolved.

PR Checklist

  • RELEASE.md has been updated to describe the changes made in this PR
  • Documentation
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date, or added when necessary
    • Documentation has been rebuilt successfully
    • Examples have been updated
  • Tests pass (If not, and this is expected, please elaborate in the tests section)
  • PR description thoroughly describes the new feature, bug fix, etc.

Related issues

N/A, this is a brand new issue blocking a PR.

Impacted areas of the software

  • hopp/simulation/technologies/pySSC_daotk/ssc_wrap.py
    • PySSC.data_set_array: reshapes the passed NumPy array from (N, 1) to (N).
  • hopp/simulation/technologies/csp/pySSC_daotk/ssc_wrap.py
    • PySSC.data_set_array: reshapes the passed NumPy array from (N, 1) to (N).

Additional supporting information

All test failures were due to this line of code in hopp/simulation/technologies/pySSC_daotk/ssc_wrap.py::PySSC.data_set_array

image

Test results, if applicable

@RHammond2 RHammond2 requested a review from johnjasa January 28, 2026 16:43
@RHammond2 RHammond2 added the bug Something isn't working label Jan 28, 2026
@johnjasa johnjasa changed the base branch from main to develop January 28, 2026 21:14
Copy link
Collaborator

@johnjasa johnjasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks Rob!

@johnjasa johnjasa merged commit f1d33ed into NatLabRockies:develop Jan 28, 2026
5 checks passed
@RHammond2 RHammond2 deleted the fix/set-array-flatten branch January 28, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants