From ccd80beb4d9c7147651864447e7ffe454e64c13f Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sat, 25 Oct 2014 14:00:21 +0200 Subject: Remove useless module alias --- main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index d6ebe3d..8c0f87c 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,7 @@ from collections import Counter import webbrowser import pygal -import numpy as np +import numpy import pygeoip from wikibania.ban.BanDB import BanDB @@ -49,7 +49,7 @@ ban_db_wrapper = BanDBWrapper(ban_db) # HISTOGRAM ban_durations = ban_db_wrapper.get_all_durations() -(ban_durations_bars, bins) = np.histogram(ban_durations, bins=range(1, 50 + 2)) +(ban_durations_bars, bins) = numpy.histogram(ban_durations, bins=range(1, 50 + 2)) bar_chart = pygal.Bar(legend_at_bottom=True) bar_chart.title = "Active Wikipedia bans by duration (%d samples)" % len(ban_db.list()) @@ -65,10 +65,10 @@ if OPEN_FILES: with open(STATS_FILE, "w") as stats_file: stats_file.write("Ban duration:\n") - stats_file.write("Mean: %.2f days\n" % np.mean(ban_durations)) - stats_file.write("Median: %.2f days\n" % np.median(ban_durations)) - stats_file.write("Deviation: %.2f\n" % np.std(ban_durations)) - stats_file.write("Variance: %.2f\n" % np.var(ban_durations)) + stats_file.write("Mean: %.2f days\n" % numpy.mean(ban_durations)) + stats_file.write("Median: %.2f days\n" % numpy.median(ban_durations)) + stats_file.write("Deviation: %.2f\n" % numpy.std(ban_durations)) + stats_file.write("Variance: %.2f\n" % numpy.var(ban_durations)) if OPEN_FILES: webbrowser.open(STATS_FILE, 2) -- cgit v1.2.3