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

Improve type-stability of sesolve #191

Merged
merged 7 commits into from
Jul 25, 2024

Conversation

albertomercurio
Copy link
Member

With the previous PR, I fixed the type instabilities of the sesolve function.

However, a weak type instability was still present at the level of the ODEProblem generation. By weak I mean that the type of the ODEProblem was known up to a Union.

Fixing this will help me on fixing type instabilities for the mesolve and mcsolve functions.

I think that I have introduced a very smat way to deal with multiple dispatch with keyword arguments. For example, the progress_bar argument now supports both a Bool type and a Val type, with the second one as a default to avoid weak type instabilities. In this way, the user can still use progress_bar = true,false, with the price to pay of having weak type instabilities.

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.50%. Comparing base (8f5444b) to head (34d3740).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #191      +/-   ##
==========================================
+ Coverage   93.37%   93.50%   +0.13%     
==========================================
  Files          28       28              
  Lines        2113     2126      +13     
==========================================
+ Hits         1973     1988      +15     
+ Misses        140      138       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ytdHuang ytdHuang merged commit d65e5cc into qutip:main Jul 25, 2024
14 checks passed
@albertomercurio albertomercurio deleted the type-inference-tests branch September 28, 2024 21:48
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