numODEsolver 0.5__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {numodesolver-0.5 → numodesolver-0.5.2}/PKG-INFO +1 -1
- {numodesolver-0.5 → numodesolver-0.5.2}/numODEsolver/solver.py +4 -4
- {numodesolver-0.5 → numodesolver-0.5.2}/numODEsolver.egg-info/PKG-INFO +1 -1
- {numodesolver-0.5 → numodesolver-0.5.2}/setup.py +1 -1
- {numodesolver-0.5 → numodesolver-0.5.2}/LICENSE +0 -0
- {numodesolver-0.5 → numodesolver-0.5.2}/README.md +0 -0
- {numodesolver-0.5 → numodesolver-0.5.2}/numODEsolver/__init__.py +0 -0
- {numodesolver-0.5 → numodesolver-0.5.2}/numODEsolver.egg-info/SOURCES.txt +0 -0
- {numodesolver-0.5 → numodesolver-0.5.2}/numODEsolver.egg-info/dependency_links.txt +0 -0
- {numodesolver-0.5 → numodesolver-0.5.2}/numODEsolver.egg-info/requires.txt +0 -0
- {numodesolver-0.5 → numodesolver-0.5.2}/numODEsolver.egg-info/top_level.txt +0 -0
- {numodesolver-0.5 → numodesolver-0.5.2}/setup.cfg +0 -0
|
@@ -6,10 +6,10 @@ class solver:
|
|
|
6
6
|
# get_function() -> Takes a function of x and y as an input. Make sure to use correct python syntax and put everything in curved brackets.
|
|
7
7
|
# --> Example: numODEsolver.get_function("x+y"), The diff.eq. would then be: y' = x+y and it will be numerically solved for y.
|
|
8
8
|
def get_function(self,func):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
x,y = sp.symbols("x y")
|
|
10
|
+
func = sp.sympify(func)
|
|
11
|
+
f = sp.lambdify((x,y), func, "numpy")
|
|
12
|
+
return f
|
|
13
13
|
|
|
14
14
|
# You can choose between 2 methods to solve the ODE numerically : euler and rk4. Those take the function f from before
|
|
15
15
|
# as an input and 2 Initial conditions x0 and y0 as well as an x-axis bound. If n is a high number the result will be more accurate.
|
|
@@ -8,7 +8,7 @@ classifiers = [
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="numODEsolver",
|
|
11
|
-
version= "0.5",
|
|
11
|
+
version= "0.5.2",
|
|
12
12
|
description= "Tool that solves and plots ODE's numerically. Written in Python.",
|
|
13
13
|
long_description=open("README.md").read(),
|
|
14
14
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|