def logpdf(self, x): r = _lazyselect([x < self.lower_bound, (self.lower_bound <= x) & (x <= self.upper_bound), x > self.upper_bound], [lambda x: 0, lambda x: self.frozen_dist.logpdf(x)-np.log(self.untruncated_mass), lambda x: 0], (x, )) return r
def cdf(self, x): r = _lazyselect([x < self.lower_bound, self.lower_bound <= x <= self.upper_bound, x > self.upper_bound], [lambda x: 0, lambda x: ((self.frozen_dist.cdf(x)-self.mass_below_lower_bound) *self.untruncated_mass), lambda x: 1], (x, )) return r