changeset 71:9a2674b32754

stubbing
author Jeff Hammel <k0scist@gmail.com>
date Sat, 28 Feb 2015 17:02:20 -0800
parents 7a979736bbfc
children 06094870fdd7
files numerics/histogram.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/numerics/histogram.py	Sat Feb 28 17:00:35 2015 -0800
+++ b/numerics/histogram.py	Sat Feb 28 17:02:20 2015 -0800
@@ -40,10 +40,20 @@
 
     def add(self, *values):
         """add values to the histogram"""
+        for value in values:
+            raise NotImplementedError('TODO') # -> record TODO items
 
     def __iadd__(self, value):
+        self.add(value)
         return self
 
+    def __call__(self, *values):
+        """
+        add values to the histogram and return
+        OrderedDict of counts
+        """
+        self.add(*values)
+
 class HistogramParser(CSVParser):
     """histogram CLI option parser"""