[bugfix] special method __nonzero__ should always return type bool

This commit is contained in:
Sebastian Wehling-Benatelli 2016-04-12 14:48:57 +02:00
parent 6181829ef6
commit 416f4c7aa7

View File

@ -154,7 +154,7 @@ class ProbabilityDensityFunction(object):
prec = self.precision(self.incr)
gtzero = np.all(self.data >= 0)
probone = bool(np.round(self.prob_gt_val(self.axis[0]), prec) == 1.)
return (gtzero and probone)
return bool(gtzero and probone)
def __str__(self):
return str(self.data)