Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3144f6d

Browse files
committed
Adjust exponent of step-size correction to match method-order.
1 parent 3bf9f09 commit 3144f6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/streamplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def _rk12(x0, y0, dmap, f):
437437
stotal += ds
438438

439439
# recalculate stepsize based on step error
440-
ds = min(maxds, 0.85 * ds * (maxerror/error)**0.2)
440+
ds = min(maxds, 0.85 * ds * (maxerror/error)**0.5)
441441

442442
return stotal, xf_traj, yf_traj
443443

0 commit comments

Comments
 (0)