feat(maths): add numerical methods for solving ordinary differential ecuations#14864
feat(maths): add numerical methods for solving ordinary differential ecuations#14864sauriopqno wants to merge 5 commits into
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
|
|
||
|
|
||
| def euler_method( | ||
| f: Callable[[float, float], float], x0: float, y0: float, h: float, steps: int |
There was a problem hiding this comment.
Please provide descriptive name for the parameter: f
Please provide descriptive name for the parameter: h
|
|
||
|
|
||
| def heuns_method( | ||
| f: Callable[[float, float], float], x0: float, y0: float, h: float, steps: int |
There was a problem hiding this comment.
Please provide descriptive name for the parameter: f
Please provide descriptive name for the parameter: h
| if __name__ == "__main__": | ||
| import doctest | ||
|
|
||
| doctest.testmod() |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file maths/numerical_analysis/ordinary_differential_equations.py, please provide doctest for the function example_ode
Please provide descriptive name for the parameter: x
Please provide descriptive name for the parameter: y
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
|
|
||
|
|
||
| def euler_method( | ||
| f: Callable[[float, float], float], x0: float, y0: float, h: float, steps: int |
There was a problem hiding this comment.
Please provide descriptive name for the parameter: f
Please provide descriptive name for the parameter: h
|
|
||
|
|
||
| def heuns_method( | ||
| f: Callable[[float, float], float], x0: float, y0: float, h: float, steps: int |
There was a problem hiding this comment.
Please provide descriptive name for the parameter: f
Please provide descriptive name for the parameter: h
| doctest.testmod() | ||
|
|
||
| # example | ||
| def example_ode(x: float, y: float) -> float: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file maths/numerical_analysis/ordinary_differential_equations.py, please provide doctest for the function example_ode
Please provide descriptive name for the parameter: x
Please provide descriptive name for the parameter: y
c56880e to
f5b57a9
Compare
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
|
|
||
|
|
||
| def euler_method( | ||
| f: Callable[[float, float], float], x0: float, y0: float, h: float, steps: int |
There was a problem hiding this comment.
Please provide descriptive name for the parameter: f
Please provide descriptive name for the parameter: h
|
|
||
|
|
||
| def heuns_method( | ||
| f: Callable[[float, float], float], x0: float, y0: float, h: float, steps: int |
There was a problem hiding this comment.
Please provide descriptive name for the parameter: f
Please provide descriptive name for the parameter: h
| doctest.testmod() | ||
|
|
||
| # example | ||
| def example_ode(x: float, y: float) -> float: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file maths/numerical_analysis/ordinary_differential_equations.py, please provide doctest for the function example_ode
Please provide descriptive name for the parameter: x
Please provide descriptive name for the parameter: y
…pqno/Python into add-ode-numerical-methods Edit theordinary_differential_ecuations.py file
f6b8bd2 to
6282e30
Compare
for more information, see https://pre-commit.ci
…equations
Describe your change:
This pull request introduces a new module containing two classic numerical methods for solving first-order Ordinary Differential Equations (ODEs) of the form y' = f(x, y).
The implemented methods are:
Checklist: