From 96b6cb01ebc8550d6b3c903a35c90041ae7d4020 Mon Sep 17 00:00:00 2001 From: Mikiya Abe Date: Sat, 21 Apr 2018 15:54:14 +0900 Subject: [PATCH] ch01: make a slice index an integer --- ch01/analyze_webstats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch01/analyze_webstats.py b/ch01/analyze_webstats.py index 5da892e2..fd052d17 100644 --- a/ch01/analyze_webstats.py +++ b/ch01/analyze_webstats.py @@ -81,7 +81,7 @@ def plot_models(x, y, models, fname, mx=None, ymax=None, xmin=None): x, y, [f1, f2, f3, f10, f100], os.path.join(CHART_DIR, "1400_01_04.png")) # fit and plot a model using the knowledge about inflection point -inflection = 3.5 * 7 * 24 +inflection = int(3.5 * 7 * 24) xa = x[:inflection] ya = y[:inflection] xb = x[inflection:]