Commit 1a5defaf authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Handle errors in the computation of the PDF, as suggested by Yannick. This avoid a crash.

parent fdd1d247
...@@ -72,7 +72,7 @@ def gen_pdf(values, probabilities, grid): ...@@ -72,7 +72,7 @@ def gen_pdf(values, probabilities, grid):
try: try:
result = gaussian_kde(combined_values)(grid) result = gaussian_kde(combined_values)(grid)
except LinAlgError: except (LinAlgError, ValueError):
result = None result = None
return result return result
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