From 7042fe1889c2fcda68b84fccbbd1436eb80e203c Mon Sep 17 00:00:00 2001 From: dhruv Date: Sat, 31 Jan 2026 15:12:53 +0530 Subject: [PATCH] Fix segmentation fault when ESS < 10 by raising ValueError --- dingo/PolytopeSampler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dingo/PolytopeSampler.py b/dingo/PolytopeSampler.py index 27f3785..594838b 100644 --- a/dingo/PolytopeSampler.py +++ b/dingo/PolytopeSampler.py @@ -138,6 +138,9 @@ def generate_steady_states( """ self.get_polytope() + + if ess < 10: + raise ValueError(f"Effective sample size (ess) must be at least 10 to avoid numerical instability. Got {ess}.") P = HPolytope(self._A, self._b)