Open Yukun-Xie opened 2 years ago
def timeindexer(self, l, value, a, b): if a < b: #Here, it should be a <= b.
l[a:b] = value else: l[a:len(l)] = value l[0:b] = value return l
def timeindexer(self, l, value, a, b): if a < b: #Here, it should be a <= b.
Otherwise, if the a=b, the person will be 'away' for a whole day, and you will get a 0 denominator in ‘pdf /= np.sum(pdf)’