[Numpy-svn] r3113 - in trunk/numpy: . core

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Sep 4 18:23:45 CDT 2006


Author: oliphant
Date: 2006-09-04 18:23:40 -0500 (Mon, 04 Sep 2006)
New Revision: 3113

Modified:
   trunk/numpy/_import_tools.py
   trunk/numpy/core/ma.py
Log:
Fix ticket #271 and turn default printing of warnings off

Modified: trunk/numpy/_import_tools.py
===================================================================
--- trunk/numpy/_import_tools.py	2006-09-04 22:42:18 UTC (rev 3112)
+++ trunk/numpy/_import_tools.py	2006-09-04 23:23:40 UTC (rev 3113)
@@ -155,7 +155,7 @@
 
      Optional keyword inputs:
 
-       - verbose - integer specifying verbosity level [default: 0].
+       - verbose - integer specifying verbosity level [default: -1].
                    verbose=-1 will suspend also warnings.
        - force   - when True, force reloading loaded packages [default: False].
        - postpone - when True, don't load packages [default: False]
@@ -168,7 +168,7 @@
         self.info_modules = {}
         if options.get('force',False):
             self.imported_packages = []
-        self.verbose = verbose = options.get('verbose',False)
+        self.verbose = verbose = options.get('verbose',-1)
         postpone = options.get('postpone',None)
         self._init_info_modules(packages or None)
 

Modified: trunk/numpy/core/ma.py
===================================================================
--- trunk/numpy/core/ma.py	2006-09-04 22:42:18 UTC (rev 3112)
+++ trunk/numpy/core/ma.py	2006-09-04 23:23:40 UTC (rev 3113)
@@ -1543,7 +1543,11 @@
     """
     af = filled(a)
     if isinstance(repeats, types.IntType):
-        repeats = tuple([repeats]*(shape(af)[axis]))
+        if axis is None:
+            num = af.size
+        else:
+            num = af.shape[axis]
+        repeats = tuple([repeats]*num)
 
     m = getmask(a)
     if m is not nomask:



More information about the Numpy-svn mailing list