Skip to content
Snippets Groups Projects
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
Branches
No related tags found
No related merge requests found
......@@ -2203,6 +2203,7 @@ class BinnedLnPDF(BinnedDensity):
return InterpBinnedArray(self)
def at_centres(self):
with numpy.errstate(divide = "ignore", invalid = "ignore"):
return numpy.log(super(BinnedLnPDF, self).at_centres()) - self.norm
def marginalize(self, dim):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment