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

Fix calculate_ensemble_errors' error vector types. #787

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

henhen724
Copy link

@henhen724 henhen724 commented Sep 16, 2024

Context explained in this PR: SciML/DiffEqDevTools.jl#145

"The current version of SciMLBase's calculate_ensemble_errors returns errors that have the same number type as the solution vector. So, for complex solutions it returns ComplexF64 type errors (with zero imaginary part) and then the plotter will refused to plot them."

I am having some precompilation errors with some of the test on my machine, so I was not able to run all tests. However, the change is so minor it is hard to imagine that it broke anything.

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

err_type = typeof(collect(u[1].errors)[1][2])
errors = Dict{Symbol, Vector{err_type}}() #Should add type information
error_means = Dict{Symbol, err_type}()
error_medians = Dict{Symbol, err_type}()
Copy link
Member

Choose a reason for hiding this comment

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

Won't you need to take the norm as well?

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.

2 participants