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
coverage: 93.695% (-0.2%) from 93.903%
when pulling f1e53eb4726d613c1d769d62a7c4618b9a77dd63 on swryan:numpy2_tests
into 6b48528fb032592be9ca912136aff2045a95248f on OpenMDAO:master.
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:The generation of that error message has been wrapped in a NumPy
printoptions
context to preserve the previous formatting.Also:
Related Issues
Backwards incompatibilities
None
New Dependencies
None