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 checks on 'sde()' method for user defined 'SDE' or 'SDEs' subclasses #21

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

m-cip
Copy link
Collaborator

@m-cip m-cip commented Apr 24, 2020

  • The type, length and keys of sde() returned values are now checked and exceptions raised, hinting at the cause of the problem.
  • Equations may omit zero terms, e.g. dX = sigma*X*dW may be stated as {'dw': X} as well as {'dw': X, 'dt': 0}.

The new checks insist on the inner python loop (the true inner loop runs across paths and is delegated to numpy), with no recognizable impact on performance.

Fixes #20

@codecov-io
Copy link

Codecov Report

Merging #21 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   91.63%   91.70%   +0.06%     
==========================================
  Files           7        7              
  Lines        1889     1904      +15     
  Branches      272      277       +5     
==========================================
+ Hits         1731     1746      +15     
  Misses         96       96              
  Partials       62       62              
Impacted Files Coverage Δ
sdepy/integration.py 91.86% <100.00%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6396bfd...a91656c. Read the comment docs.

@sdepy sdepy merged commit eeb9932 into sdepy:master Apr 24, 2020
@m-cip m-cip deleted the fix_sdes branch April 24, 2020 13:05
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.

Improve checks on 'sde()' method for user defined 'SDE' or 'SDEs' subclasses
3 participants