diff options
Diffstat (limited to 'lib/plotter.py')
-rwxr-xr-x | lib/plotter.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/plotter.py b/lib/plotter.py index 9ba4786..e4d9926 100755 --- a/lib/plotter.py +++ b/lib/plotter.py @@ -15,9 +15,15 @@ def float_or_nan(n): return np.nan 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] def is_state(aggregate, name): + """Return true if name is a state and not UNINITIALIZED.""" return aggregate[name]['isa'] == 'state' and name != 'UNINITIALIZED' def plot_states(model, aggregate): |