From 91cd4c24c3b65a1dc6f5d6abeb4c5c9f3c3a6e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kn=C3=BCttel?= Date: Wed, 24 Jul 2019 19:23:49 +0200 Subject: [PATCH] updated test.py --- test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test.py b/test.py index ad95b62..9caaedf 100644 --- a/test.py +++ b/test.py @@ -1,5 +1,13 @@ import interpol.spline.linear.do as do import numpy as np + +import matplotlib.pyplot as plt + x = np.arange(0, 4, 0.3) y = np.cos(x) ip = do.InterPolator(x, y) + +x_bar = np.arange(0, 4, 0.01) +plt.plot(x_bar, np.cos(x_bar)) +plt.plot(x_bar, [ip.eval_float((i,)) for i in x_bar]) +plt.show()