From 2a70358c166f32ea18fdfb20853b6242414dfc4a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 5 Feb 2019 17:20:46 +0100 Subject: move flatten to utils --- lib/plotter.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/plotter.py') diff --git a/lib/plotter.py b/lib/plotter.py index 8a28f4c..e4c7701 100755 --- a/lib/plotter.py +++ b/lib/plotter.py @@ -5,14 +5,7 @@ import numpy as np import matplotlib.pyplot as plt import re from matplotlib.patches import Polygon - -def flatten(somelist): - """ - Flatten a list. - - Example: flatten([[1, 2], [3], [4, 5]]) -> [1, 2, 3, 4, 5] - """ - return [item for sublist in somelist for item in sublist] +from utils import flatten def is_state(aggregate, name): """Return true if name is a state and not UNINITIALIZED.""" -- cgit v1.2.3