Commit 1964963c authored by Kipp Cannon's avatar Kipp Cannon
Browse files

rate.BinnedLnPDF.at_centres(): silence warnings

- it's normal for PDFs to be 0, but that leads to complains about divide-by-zero and invalid value in subtract in the .normalize() method of BinnedLnPDF.
- this patch silences
parent e3e1b149
......@@ -2203,7 +2203,8 @@ class BinnedLnPDF(BinnedDensity):
return InterpBinnedArray(self)
def at_centres(self):
return numpy.log(super(BinnedLnPDF, self).at_centres()) - self.norm
with numpy.errstate(divide = "ignore", invalid = "ignore"):
return numpy.log(super(BinnedLnPDF, self).at_centres()) - self.norm
def marginalize(self, dim):
new = super(BinnedLnPDF, self).marginalize(dim)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment