Skip to content

convert np.float_ to np.float64#318

Merged
jehsharp merged 3 commits into
sandialabs:developfrom
zolanaj:update-numpy-floats
Feb 6, 2026
Merged

convert np.float_ to np.float64#318
jehsharp merged 3 commits into
sandialabs:developfrom
zolanaj:update-numpy-floats

Conversation

@zolanaj
Copy link
Copy Markdown

@zolanaj zolanaj commented Jan 16, 2026

Purpose

When using NumPy v. 2.0+, the following error results when running OpenCSP:
AttributeError: np.float_was removed in the NumPy 2.0 release. Usenp.float64 instead.

Summary of changes

This PR converts all instances of np.float_ to np.float64

Implementation notes

Running OpenCSP scripts using major versions 1 and 2 of NumPy were successful.

Submission checklist

  • Target branch is develop, not main
  • Existing tests are updated or new tests were added
  • opencsp/test/test_DocStringsExist.py are verified to include this change or have been updated accordingly
  • .rst file(s) under doc/ are verified to include this change or have been updated accordingly

Additional information

The submission checklist above is somewhat incomplete, as no required test or docstrings updates should be necessary for this. However, this should allow NumPy to be up to date moving forward.

Copy link
Copy Markdown
Collaborator

@jehsharp jehsharp left a comment

Choose a reason for hiding this comment

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

This is great, thanks again Alex for the contribution! This works with our current requirements.txt file.

@jehsharp jehsharp merged commit 8a31bdc into sandialabs:develop Feb 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants