diff --git a/RunHypot.py b/Hypot.py similarity index 97% rename from RunHypot.py rename to Hypot.py index 506429e..e2b736c 100755 --- a/RunHypot.py +++ b/Hypot.py @@ -77,7 +77,6 @@ def plotspeed(N, pyrat, fortrat): ax.plot(N, fortrat, label="Fortran") ax.set_title( - "timeit(sqrt(a**2+b**2)) / timeit(hypot(a,b))\n" f"Numpy {np.__version__} Python {pyver} Gfortran {fortver}\n" f"{platform.system()} {platform.machine()}" ) @@ -85,6 +84,7 @@ def plotspeed(N, pyrat, fortrat): ax.legend(loc="best") ax.grid(True, which="both") ax.set_xlabel("N length of vectors a,b") + ax.set_ylabel("timeit(sqrt($a^2+b^2$)) / timeit(hypot(a,b))") figfn = bdir / "hypot.png" print("saved figure to", figfn) diff --git a/README.md b/README.md index 304eded..6900120 100644 --- a/README.md +++ b/README.md @@ -61,14 +61,10 @@ inf Execute the Hypot speed test by: ```sh -python RunHypot.py +python Hypot.py ``` -![Python 3.6 hypot() vs rsq()](.gfx/py36hypot.png) - -![Python 2.7 hypot() vs rsq()](./gfx/py27hypot.png) - -![Python 3.5 hypot() vs rsq()](./gfx/py35hypot.png) +![hypot() vs rsq()](.gfx/hypot.png) ## Notes diff --git a/gfx/hypot.png b/gfx/hypot.png new file mode 100644 index 0000000..801d2f5 Binary files /dev/null and b/gfx/hypot.png differ