[Scipy-svn] r2745 - trunk/Lib/sandbox/montecarlo/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Thu Feb 22 04:42:14 EST 2007


Author: stefan
Date: 2007-02-22 03:42:06 -0600 (Thu, 22 Feb 2007)
New Revision: 2745

Modified:
   trunk/Lib/sandbox/montecarlo/tests/test_dictsampler.py
Log:
Fix generator usage in sandbox.montecarlo.


Modified: trunk/Lib/sandbox/montecarlo/tests/test_dictsampler.py
===================================================================
--- trunk/Lib/sandbox/montecarlo/tests/test_dictsampler.py	2007-02-22 09:41:02 UTC (rev 2744)
+++ trunk/Lib/sandbox/montecarlo/tests/test_dictsampler.py	2007-02-22 09:42:06 UTC (rev 2745)
@@ -37,7 +37,7 @@
         #import pdb
         #pdb.set_trace()
         s = sampler.sample(n)
-        assert sum(s[i]=='b' for i in range(n),axis=0)*1./n > 0.75
+        assert sum((s[i]=='b' for i in range(n)),axis=0)*1./n > 0.75
 
         #lam = 10.0
         #n = 35




More information about the Scipy-svn mailing list