Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small: Fix NumPy 2.0 test script breakage #1116

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Conversation

BenWibking
Copy link
Collaborator

@BenWibking BenWibking commented Jun 17, 2024

PR Summary

This fixes the test script breakage due to NumPy 2.0 API changes (https://numpy.org/devdocs/numpy_2_0_migration_guide.html#numpy-2-0-migration-guide)

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

@BenWibking BenWibking changed the title fix NumPy 2.0 breakage Fix NumPy 2.0 test script breakage Jun 17, 2024
Copy link
Collaborator

@lroberts36 lroberts36 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for figuring this out.

remaining_size = np.product(vShape[1:])
remaining_size = np.prod(vShape[1:])
Copy link
Collaborator

Choose a reason for hiding this comment

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

glad to see that the numpy gods thought this was a necessary change.

Copy link
Collaborator

Choose a reason for hiding this comment

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

actually, does prod work for older versions of numpy or will this break the test suite when not using the newer numpy?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@BenWibking BenWibking changed the title Fix NumPy 2.0 test script breakage Small: Fix NumPy 2.0 test script breakage Jun 17, 2024
@pgrete pgrete disabled auto-merge June 18, 2024 07:31
@pgrete pgrete enabled auto-merge (squash) June 18, 2024 07:31
@pgrete pgrete merged commit 85ded14 into develop Jun 18, 2024
50 checks passed
@pgrete pgrete deleted the BenWibking/fix-numpy-2 branch June 18, 2024 08:57
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.

3 participants