From 416f4c7aa7d4fde5cec0874b038c7729e82df368 Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Tue, 12 Apr 2016 14:48:57 +0200 Subject: [PATCH] [bugfix] special method __nonzero__ should always return type bool --- pylot/core/util/pdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylot/core/util/pdf.py b/pylot/core/util/pdf.py index dddb260f..6f986666 100644 --- a/pylot/core/util/pdf.py +++ b/pylot/core/util/pdf.py @@ -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)