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

Fixed a NumPy 2.x testing issue and added a NumPy 2.x build to the test workflow #1114

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

swryan
Copy link
Contributor

@swryan swryan commented Oct 2, 2024

Summary

Tests in dymos/examples/brachistochrone/test/test_duplicate_constraints.py were failing with NumPy 2.x due to a change in the numpy representation:

AssertionError: 'Dupl[71 chars] `theta` are used in multiple path constraints:\n{np.int64(0)}' != 'Dupl[71 chars] `theta` are used in multiple path constraints:\n{0}'
  Duplicate constraint in phase traj0.phases.phase0. The following indices of `theta` are used in multiple path constraints:
- {np.int64(0)}
+ {0}

The generation of that error message has been wrapped in a NumPy printoptions context to preserve the previous formatting.

Also:

  • a NumPy 2.x build has been added to the test workflow

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

@coveralls
Copy link

Coverage Status

coverage: 93.695% (-0.2%) from 93.903%
when pulling f1e53eb on swryan:numpy2_tests
into 6b48528 on OpenMDAO:master.

@robfalck robfalck self-requested a review October 3, 2024 12:20
@robfalck robfalck merged commit a3dd77e into OpenMDAO:master Oct 3, 2024
11 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.

3 participants