Author: bugman Date: Fri Mar 21 13:49:16 2008 New Revision: 5117 URL: http://svn.gna.org/viewcvs/relax?rev=5117&view=rev Log: Fix for bug #11004 (https://gna.org/bugs/?11004). The division by zero is now caught and avoided, but this bug has been triggered by a deeper problem which is likely to uncover additional bugs. Modified: 1.3/generic_fns/monte_carlo.py Modified: 1.3/generic_fns/monte_carlo.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/monte_carlo.py?rev=5117&r1=5116&r2=5117&view=diff ============================================================================== --- 1.3/generic_fns/monte_carlo.py (original) +++ 1.3/generic_fns/monte_carlo.py Fri Mar 21 13:49:16 2008 @@ -226,7 +226,10 @@ Xsum = Xsum + param_array[i] # Calculate the mean parameter value for all simulations. - Xav = Xsum / float(n) + if n == 0: + Xav = 0 + else: + Xav = Xsum / float(n) # Calculate the sum part of the standard deviation. sd = 0.0