nDimensional sparse histogram in python.
KraftDiner
bobrien18 at yahoo.com
Wed Feb 1 22:06:29 EST 2006
Cool.
Ok so my histogram class had two methods 1) To increment a point and 2)
to get the point.
def class histo:
def __init__(self):
histo = {}
def update(point):
'''searches the dictionary for point and if it exists increment the
value.
if it doesn't exist set the value to 1'''
def get(point):
return self.histo[point]
I'm not sure how to code up the update routine...
More information about the Python-list
mailing list