mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 10:31:29 +08:00
Upgrade to Python 3.13 (#11588)
This commit is contained in:
@ -24,13 +24,13 @@ def euler_modified(
|
||||
>>> def f1(x, y):
|
||||
... return -2*x*(y**2)
|
||||
>>> y = euler_modified(f1, 1.0, 0.0, 0.2, 1.0)
|
||||
>>> y[-1]
|
||||
>>> float(y[-1])
|
||||
0.503338255442106
|
||||
>>> import math
|
||||
>>> def f2(x, y):
|
||||
... return -2*y + (x**3)*math.exp(-2*x)
|
||||
>>> y = euler_modified(f2, 1.0, 0.0, 0.1, 0.3)
|
||||
>>> y[-1]
|
||||
>>> float(y[-1])
|
||||
0.5525976431951775
|
||||
"""
|
||||
n = int(np.ceil((x_end - x0) / step_size))
|
||||
|
Reference in New Issue
Block a user