# HG changeset patch # User Nicolas Saunier # Date 1438898425 14400 # Node ID b75d0c258ca975f93cf14ebc673c5e514be6d06d # Parent e14e2101a5a9d1de9189d93c92f845bd9be0b3e7 update to indicator class diff -r e14e2101a5a9 -r b75d0c258ca9 python/indicators.py --- a/python/indicators.py Thu Aug 06 17:47:04 2015 -0400 +++ b/python/indicators.py Thu Aug 06 18:00:25 2015 -0400 @@ -44,10 +44,7 @@ def __getitem__(self, t): 'Returns the value at time t' - if t in self.values.keys(): - return self.values[t] - else: - return None + return self.values.get(t) def getIthValue(self, i): sortedKeys = sorted(self.values.keys()) @@ -87,17 +84,6 @@ if self.maxValue: ylim(ymax = self.maxValue) - def valueSorted(self): - ''' return the values after sort the keys in the indicator - This should probably not be used: to delete''' - print('Deprecated: values should not be accessed in this way') - values=[] - keys = self.values.keys() - keys.sort() - for key in keys: - values.append(self.values[key]) - return values - def l1Distance(x, y): # lambda x,y:abs(x-y) if x is None or y is None: