changeset 78:9b9bfbcdd749

find min, max
author Jeff Hammel <k0scist@gmail.com>
date Sun, 01 Mar 2015 09:04:36 -0800
parents dcfce20597a6
children c70ef55b6141
files numerics/histogram.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/numerics/histogram.py	Sun Mar 01 08:52:50 2015 -0800
+++ b/numerics/histogram.py	Sun Mar 01 09:04:36 2015 -0800
@@ -104,6 +104,11 @@
     # transpose to columns
     columns = transpose(data)
 
+    # find min, max if not provided
+    if options.min is None:
+        options.min = min([min(column) for column in columns])
+    if options.max is None:
+        options.min = max([max(column) for column in columns])
 
 if __name__ == '__main__':
     main()