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

Cleanup assert_cases_equal. #778

Closed
1 of 4 tasks
robfalck opened this issue Jul 10, 2022 · 0 comments · Fixed by #779
Closed
1 of 4 tasks

Cleanup assert_cases_equal. #778

robfalck opened this issue Jul 10, 2022 · 0 comments · Fixed by #779
Assignees

Comments

@robfalck
Copy link
Contributor

robfalck commented Jul 10, 2022

Issue Type

  • Bug
  • Enhancement
  • Docs
  • Miscellaneous

Description

The test utility assert_cases_equal currently prints out the difference in each element of an array when a difference is found. Chance this such that it only prints out the max and mean values of the differences.

Example

The current test for difference values in assert_cases_equal outputs differences between 3 variables a, b, and c.
Rather than printing the entirety of these arrays, which can grow large for some real-world problems, only print out the mean and max differences:

The following variables contain different values:
var        max error       mean error
--- ---------------- ----------------
  a  4.000000000e+00  2.000000000e+00
  b  5.000000000e+00  2.500000000e+00
  c  4.000000000e+00  1.333333333e+00

Environment

Dymos 1.5.1-dev

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 a pull request may close this issue.

1 participant