[Scipy-svn] r5312 - in trunk/scipy: io/matlab stats/tests

scipy-svn@scip... scipy-svn@scip...
Wed Dec 31 16:16:37 CST 2008


Author: jarrod.millman
Date: 2008-12-31 16:16:36 -0600 (Wed, 31 Dec 2008)
New Revision: 5312

Modified:
   trunk/scipy/io/matlab/mio5.py
   trunk/scipy/stats/tests/test_discrete_basic.py
Log:
identity test faster than equality test


Modified: trunk/scipy/io/matlab/mio5.py
===================================================================
--- trunk/scipy/io/matlab/mio5.py	2008-12-31 22:06:00 UTC (rev 5311)
+++ trunk/scipy/io/matlab/mio5.py	2008-12-31 22:16:36 UTC (rev 5312)
@@ -904,7 +904,7 @@
         if isinstance(narr, MatlabObject):
             return Mat5ObjectWriter(*args)
         if narr.dtype.hasobject: # cell or struct array
-            if narr.dtype.fields == None:
+            if narr.dtype.fields is None:
                 return Mat5CellWriter(*args)
             else:
                 return Mat5StructWriter(*args)

Modified: trunk/scipy/stats/tests/test_discrete_basic.py
===================================================================
--- trunk/scipy/stats/tests/test_discrete_basic.py	2008-12-31 22:06:00 UTC (rev 5311)
+++ trunk/scipy/stats/tests/test_discrete_basic.py	2008-12-31 22:16:36 UTC (rev 5312)
@@ -28,7 +28,7 @@
 def test_discrete_basic():
     for distname, arg in distdiscrete:
         distfn = getattr(stats,distname)
-        #assert stats.dlaplace.rvs(0.8) != None
+        #assert stats.dlaplace.rvs(0.8) is not None
         np.random.seed(9765456)
         rvs = distfn.rvs(size=2000,*arg)
         m,v = distfn.stats(*arg)



More information about the Scipy-svn mailing list