OpenMDAO / dymos

Open Source Optimization of Dynamic Multidisciplinary Systems
Apache License 2.0
210 stars 67 forks source link

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

Closed swryan closed 1 month ago

swryan commented 1 month ago

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:

Related Issues

Backwards incompatibilities

None

New Dependencies

None

coveralls commented 1 month ago

Coverage Status

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