[Numpy-svn] r4332 - in trunk: . numpy numpy/core numpy/core/tests numpy/distutils numpy/distutils/command numpy/distutils/fcompiler numpy/doc numpy/f2py numpy/f2py/lib numpy/f2py/lib/extgen numpy/f2py/lib/tests numpy/lib numpy/lib/tests numpy/linalg/lapack_lite numpy/numarray numpy/oldnumeric numpy/testing

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Oct 29 10:58:54 EDT 2007


Author: jarrod.millman
Date: 2007-10-29 09:58:18 -0500 (Mon, 29 Oct 2007)
New Revision: 4332

Modified:
   trunk/numpy/core/memmap.py
   trunk/numpy/core/numeric.py
   trunk/numpy/core/records.py
   trunk/numpy/core/setup.py
   trunk/numpy/core/tests/test_numeric.py
   trunk/numpy/distutils/ccompiler.py
   trunk/numpy/distutils/command/build_src.py
   trunk/numpy/distutils/command/config.py
   trunk/numpy/distutils/core.py
   trunk/numpy/distutils/fcompiler/__init__.py
   trunk/numpy/distutils/misc_util.py
   trunk/numpy/distutils/system_info.py
   trunk/numpy/doc/example.py
   trunk/numpy/f2py/cb_rules.py
   trunk/numpy/f2py/lib/extgen/base.py
   trunk/numpy/f2py/lib/extgen/c_support.py
   trunk/numpy/f2py/lib/extgen/py_support.py
   trunk/numpy/f2py/lib/extgen/setup_py.py
   trunk/numpy/f2py/lib/extgen/utils.py
   trunk/numpy/f2py/lib/main.py
   trunk/numpy/f2py/lib/py_wrap_type.py
   trunk/numpy/f2py/lib/tests/test_module_module.py
   trunk/numpy/lib/function_base.py
   trunk/numpy/lib/index_tricks.py
   trunk/numpy/lib/shape_base.py
   trunk/numpy/lib/tests/test_shape_base.py
   trunk/numpy/lib/twodim_base.py
   trunk/numpy/lib/type_check.py
   trunk/numpy/lib/utils.py
   trunk/numpy/linalg/lapack_lite/clapack_scrub.py
   trunk/numpy/matlib.py
   trunk/numpy/numarray/image.py
   trunk/numpy/numarray/matrix.py
   trunk/numpy/numarray/numerictypes.py
   trunk/numpy/oldnumeric/arrayfns.py
   trunk/numpy/oldnumeric/ma.py
   trunk/numpy/oldnumeric/random_array.py
   trunk/numpy/testing/numpytest.py
   trunk/setup.py
Log:
ran reindent.py to clean up whitespace


Modified: trunk/numpy/core/memmap.py
===================================================================
--- trunk/numpy/core/memmap.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/core/memmap.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -100,5 +100,4 @@
         try:
             self.close()
         except ValueError:
-            pass            
-        
+            pass

Modified: trunk/numpy/core/numeric.py
===================================================================
--- trunk/numpy/core/numeric.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/core/numeric.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -658,8 +658,8 @@
     dtype - the data-type of the resulting array.  If this is a
     record data-type, the the resulting array will be 1-d and each row will
     be interpreted as an element of the array. The number of columns
-    used must match the number of fields in the data-type in this case. 
-    
+    used must match the number of fields in the data-type in this case.
+
     comments - the character used to indicate the start of a comment
     in the file
 
@@ -699,21 +699,21 @@
 
     dtype = multiarray.dtype(dtype)
     defconv = _getconv(dtype)
-    converterseq = None    
+    converterseq = None
     if converters is None:
         converters = {}
         if dtype.names is not None:
             converterseq = [_getconv(dtype.fields[name][0]) \
                             for name in dtype.names]
-            
+
     for i,line in enumerate(fh):
         if i<skiprows: continue
         line = line[:line.find(comments)].strip()
         if not len(line): continue
         vals = line.split(delimiter)
         if converterseq is None:
-           converterseq = [converters.get(j,defconv) \
-                           for j in xrange(len(vals))]
+            converterseq = [converters.get(j,defconv) \
+                            for j in xrange(len(vals))]
         if usecols is not None:
             row = [converterseq[j](vals[j]) for j in usecols]
         else:
@@ -730,7 +730,7 @@
     else:  return X
 
 
-# adjust so that fmt can change across columns if desired. 
+# adjust so that fmt can change across columns if desired.
 
 def savetxt(fname, X, fmt='%.18e',delimiter=' '):
     """
@@ -776,11 +776,11 @@
         X.shape = origShape
 
 
-    
 
 
 
 
+
 # These are all essentially abbreviations
 # These might wind up in a special abbreviations module
 
@@ -894,10 +894,10 @@
 
     >>> seterr(over='raise') # doctest: +SKIP
     {'over': 'ignore', 'divide': 'ignore', 'invalid': 'ignore', 'under': 'ignore'}
-    
+
     >>> seterr(all='warn', over='raise') # doctest: +SKIP
     {'over': 'raise', 'divide': 'ignore', 'invalid': 'ignore', 'under': 'ignore'}
-    
+
     >>> int16(32000) * int16(3) # doctest: +SKIP
     Traceback (most recent call last):
           File "<stdin>", line 1, in ?

Modified: trunk/numpy/core/records.py
===================================================================
--- trunk/numpy/core/records.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/core/records.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -375,7 +375,7 @@
     >>> r.col1
     array([456,   2])
     >>> r.col2
-    chararray(['dbe', 'de'], 
+    chararray(['dbe', 'de'],
           dtype='|S3')
     >>> import cPickle
     >>> print cPickle.loads(cPickle.dumps(r))

Modified: trunk/numpy/core/setup.py
===================================================================
--- trunk/numpy/core/setup.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/core/setup.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -345,4 +345,3 @@
 if __name__=='__main__':
     from numpy.distutils.core import setup
     setup(configuration=configuration)
-

Modified: trunk/numpy/core/tests/test_numeric.py
===================================================================
--- trunk/numpy/core/tests/test_numeric.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/core/tests/test_numeric.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -275,13 +275,13 @@
         # use slow-clip
         selector = less(a, m)+2*greater(a, M)
         return selector.choose((a, m, M), out=out)
-    
+
     # Handy functions
     def _generate_data(self, n, m):
         return randn(n, m)
 
     def _generate_data_complex(self, n, m):
-        return randn(n, m) + 1.j *rand(n, m) 
+        return randn(n, m) + 1.j *rand(n, m)
 
     def _generate_flt_data(self, n, m):
         return (randn(n, m)).astype(float32)
@@ -320,7 +320,7 @@
     def test_simple_int(self):
         """Test native int input with scalar min/max."""
         a   = self._generate_int_data(self.nr, self.nc)
-        a   = a.astype(int) 
+        a   = a.astype(int)
         m   = -2
         M   = 4
         ac  = self.fastclip(a, m, M)
@@ -484,7 +484,7 @@
     def test_type_cast_02(self):
         "Test native int32 input with int32 scalar min/max."
         a   = self._generate_int_data(self.nr, self.nc)
-        a   = a.astype(int32) 
+        a   = a.astype(int32)
         m   = -2
         M   = 4
         ac  = self.fastclip(a, m, M)
@@ -507,7 +507,7 @@
         M   = float32(4)
         act = self.fastclip(a,m,M)
         ac  = self.clip(a,m,M)
-        assert_array_strict_equal(ac, act)        
+        assert_array_strict_equal(ac, act)
 
     def test_type_cast_04(self):
         "Test native int32 with double arrays min/max."

Modified: trunk/numpy/distutils/ccompiler.py
===================================================================
--- trunk/numpy/distutils/ccompiler.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/distutils/ccompiler.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -217,7 +217,7 @@
                                     + self.compiler[1:]
         else:
             if hasattr(self,'compiler'):
-                 log.warn("#### %s #######" % (self.compiler,))
+                log.warn("#### %s #######" % (self.compiler,))
             log.warn('Missing compiler_cxx fix for '+self.__class__.__name__)
     return
 

Modified: trunk/numpy/distutils/command/build_src.py
===================================================================
--- trunk/numpy/distutils/command/build_src.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/distutils/command/build_src.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -116,7 +116,7 @@
             self.swig_cpp = build_ext.swig_cpp
         for c in ['swig','swig_opt']:
             o = '--'+c.replace('_','-')
-            v = getattr(build_ext,c,None) 
+            v = getattr(build_ext,c,None)
             if v:
                 if getattr(self,c):
                     log.warn('both build_src and build_ext define %s option' % (o))

Modified: trunk/numpy/distutils/command/config.py
===================================================================
--- trunk/numpy/distutils/command/config.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/distutils/command/config.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -156,4 +156,3 @@
 
         self._clean()
         return exitcode, output
-

Modified: trunk/numpy/distutils/core.py
===================================================================
--- trunk/numpy/distutils/core.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/distutils/core.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -98,23 +98,23 @@
         dist = distutils.dist.Distribution()
     return dist
 
-def _exit_interactive_session(_cache=[]): 
-    if _cache: 
-        return # been here 
-    _cache.append(1) 
-    print '-'*72 
-    raw_input('Press ENTER to close the interactive session..') 
-    print '='*72 
+def _exit_interactive_session(_cache=[]):
+    if _cache:
+        return # been here
+    _cache.append(1)
+    print '-'*72
+    raw_input('Press ENTER to close the interactive session..')
+    print '='*72
 
 def setup(**attr):
 
-    if len(sys.argv)<=1 and not attr.get('script_args',[]): 
-        from interactive import interactive_sys_argv 
-        import atexit 
-        atexit.register(_exit_interactive_session) 
-        sys.argv[:] = interactive_sys_argv(sys.argv) 
-        if len(sys.argv)>1: 
-            return setup(**attr) 
+    if len(sys.argv)<=1 and not attr.get('script_args',[]):
+        from interactive import interactive_sys_argv
+        import atexit
+        atexit.register(_exit_interactive_session)
+        sys.argv[:] = interactive_sys_argv(sys.argv)
+        if len(sys.argv)>1:
+            return setup(**attr)
 
     cmdclass = numpy_cmdclass.copy()
 

Modified: trunk/numpy/distutils/fcompiler/__init__.py
===================================================================
--- trunk/numpy/distutils/fcompiler/__init__.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/distutils/fcompiler/__init__.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -207,7 +207,7 @@
     # This will be set by new_fcompiler when called in
     # command/{build_ext.py, build_clib.py, config.py} files.
     c_compiler = None
-    
+
     def __init__(self, *args, **kw):
         CCompiler.__init__(self, *args, **kw)
         self.distutils_vars = self.distutils_vars.clone(self._environment_hook)

Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/distutils/misc_util.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -1519,7 +1519,7 @@
     #copied from python 2.5.1 distutils/msvccompiler.py
     def get_build_architecture():
         """Return the processor architecture.
-        
+
         Possible results are "Intel", "Itanium", or "AMD64".
         """
         prefix = " bit ("

Modified: trunk/numpy/distutils/system_info.py
===================================================================
--- trunk/numpy/distutils/system_info.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/distutils/system_info.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -841,7 +841,7 @@
             lapack_libs = self.get_libs('lapack_libs',['mkl_lapack'])
         else:
             lapack_libs = self.get_libs('lapack_libs',['mkl_lapack32','mkl_lapack64'])
-            
+
         info = {'libraries': lapack_libs}
         dict_append(info,**mkl)
         self.set_info(**info)
@@ -1083,7 +1083,7 @@
         tgexc tgsen tgsja tgsna tgsy2 tgsyl tpcon tprfs tptri tptrs
         trcon trevc trexc trrfs trsen trsna trsyl trti2 trtri trtrs
         tzrqf tzrzf
-        
+
         lacn2 lahr2 stemr laqr0 laqr1 laqr2 laqr3 laqr4 laqr5
         ''' # [s|c|d|z]*.f
         sd_lasrc = '''

Modified: trunk/numpy/doc/example.py
===================================================================
--- trunk/numpy/doc/example.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/doc/example.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -96,4 +96,3 @@
     """
 
     pass
-

Modified: trunk/numpy/f2py/cb_rules.py
===================================================================
--- trunk/numpy/f2py/cb_rules.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/cb_rules.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -293,7 +293,7 @@
     },
     'strarglens':{isstring:',int #varname#_cb_len'}, # untested with multiple args
     'strarglens_td':{isstring:',int'}, # untested with multiple args
-    'strarglens_nm':{isstring:',#varname#_cb_len'}, # untested with multiple args 
+    'strarglens_nm':{isstring:',#varname#_cb_len'}, # untested with multiple args
      },
     { # Scalars
     'decl':{l_not(isintent_c):'\t#ctype# #varname#=(*#varname#_cb_capi);'},

Modified: trunk/numpy/f2py/lib/extgen/base.py
===================================================================
--- trunk/numpy/f2py/lib/extgen/base.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/lib/extgen/base.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -65,7 +65,7 @@
             return l
         return self._components
     components = property(components)
-        
+
     def initialize(self, *components, **options):
         """
         Set additional attributes, add components to instance, etc.
@@ -86,7 +86,7 @@
     def provides(self):
         """
         Return a code idiom name that the current class defines.
-        
+
         Used in avoiding redefinitions of functions and variables.
         """
         if self._provides is None:
@@ -123,7 +123,7 @@
             r += Component._get_class_names(b)
         return r
     _get_class_names = staticmethod(_get_class_names)
-    
+
     def add(self, component, container_label=None):
         """
         Append component and its target container label to components list.
@@ -205,7 +205,7 @@
         return evaluated template strings.
         """
         #self.finalize()
-        
+
         # clean up containers
         self.containers = {}
         for n in dir(self):
@@ -249,7 +249,7 @@
                     container = component.get_container(k)
                     container.add(r, component.provides)
             else:
-                
+
                 self.warning('%s: no container label specified for component providing %r'\
                                  % (self.__class__.__name__,component.provides))
             component.parent = old_parent
@@ -284,7 +284,7 @@
 
     def get_container(self, name):
         """ Return named container.
-        
+
         Rules for returning containers:
         (1) return local container if exists
         (2) return parent container if exists
@@ -295,7 +295,7 @@
             return self.containers[name]
         except KeyError:
             pass
-        
+
         # parent container
         parent = self.parent
         while parent is not None:
@@ -380,7 +380,7 @@
         import numpy
         return numpy.__version__
     numpy_version = property(numpy_version)
-    
+
 class Container(object):
     """
     Container of a list of named strings.
@@ -401,7 +401,7 @@
     >>> c += c2
     >>> print c
     "hey, hoo, bar"
-    
+
     """
     __metaclass__ = ComponentMetaClass
 
@@ -435,7 +435,7 @@
         self.replace_map = replace_map
         self.ignore_empty_content = ignore_empty_content
         self.skip_prefix_suffix_when_single = skip_prefix_suffix_when_single
-        
+
     def __nonzero__(self):
         return bool(self.list)
 
@@ -452,7 +452,7 @@
             for i,l in lst:
                 self.add(other.list[i], l)
         else:
-            self.add(other)        
+            self.add(other)
         return self
     __iadd__ = __add__
 
@@ -532,12 +532,12 @@
             lst = [(i,l) for (l,i) in self.label_map.items()]
             lst.sort()
             for i,l in lst:
-                cpy.add(mapping(other.list[i]), l)            
+                cpy.add(mapping(other.list[i]), l)
         return cpy
 
 def _test():
     import doctest
     doctest.testmod()
-    
+
 if __name__ == "__main__":
     _test()

Modified: trunk/numpy/f2py/lib/extgen/c_support.py
===================================================================
--- trunk/numpy/f2py/lib/extgen/c_support.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/lib/extgen/c_support.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -177,7 +177,7 @@
   %(CDeclaration)s
   %(CBody)s
 }'''
-    
+
     container_options = dict(
         CArgument = dict(separator=', ', default='void'),
         CDeclaration = dict(default='<KILLLINE>', use_indent=True, ignore_empty_content=True,
@@ -215,7 +215,7 @@
     >>> h = CHeader('noddy.h')
     >>> print h.generate()
     #include "noddy.h"
-    
+
     """
     template = '#include "%(line)s"'
 
@@ -288,6 +288,6 @@
 def _test():
     import doctest
     doctest.testmod()
-    
+
 if __name__ == "__main__":
     _test()

Modified: trunk/numpy/f2py/lib/extgen/py_support.py
===================================================================
--- trunk/numpy/f2py/lib/extgen/py_support.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/lib/extgen/py_support.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -80,7 +80,7 @@
 
         self.cdecl = PyCModuleCDeclaration(pyname)
         self += self.cdecl
-        
+
         self.main = PyCModuleInitFunction(pyname)
         self += self.main
         map(self.add, components)
@@ -93,7 +93,7 @@
     def update_SetupPy(self, parent):
         parent.setup_py += self.evaluate('    config.add_extension(%(pyname)r, sources = ["%(extmodulesrc)s"])',
                                          extmodulesrc = self.path)
-        parent.init_py += 'import %s' % (self.pyname)        
+        parent.init_py += 'import %s' % (self.pyname)
 
     def finalize(self):
         if self.need_numpy_support:
@@ -113,7 +113,7 @@
 
     def build(self, build_dir=None, clean_at_exit=None):
         """ build(build_dir=None, clean_at_exit=None)
-        
+
         A convenience function to build, import, an return
         an extension module object.
         """
@@ -123,7 +123,7 @@
             packagename = 'extgen_' + str(hex(int(time.time()*10000000)))[2:]
             build_dir = os.path.join(tempfile.gettempdir(), packagename)
             clean_at_exit = True
-            
+
         setup = Component.SetupPy(build_dir)
         setup += self
         s,o = setup.execute('build_ext','--inplace')
@@ -185,7 +185,7 @@
         )
 
     default_component_class_name = 'Line'
-    
+
     def initialize(self, pyname):
         self.pyname = pyname
         return self
@@ -225,8 +225,8 @@
       }
       return;
     }
-    """    
-    
+    """
+
     template = '''\
 %(CSpecifier)s
 %(CTypeSpec)s
@@ -320,7 +320,7 @@
         map(self.add, components)
         return self
     def update_containers(self):
-        self.container_OptExtArg += self.container_OptArg + self.container_ExtArg    
+        self.container_OptExtArg += self.container_OptArg + self.container_ExtArg
 
 class PyCFunction(CFunction):
 
@@ -329,7 +329,7 @@
     >>> f = PyCFunction('foo')
     >>> print f.generate()
     static
-    char pyc_function_foo_doc[] = 
+    char pyc_function_foo_doc[] =
     \"  foo() -> None\"
     \"\\n\\n:Returns:\\n  None\"
     ;
@@ -366,7 +366,7 @@
 
     template = '''\
 static
-char %(name)s_doc[] = 
+char %(name)s_doc[] =
 "  %(FunctionSignature)s"
 %(Title)s
 %(Description)s
@@ -399,7 +399,7 @@
 }'''
 
     container_options = CFunction.container_options.copy()
-    
+
     container_options.update(\
 
         TMP = dict(),
@@ -429,13 +429,13 @@
         ReqKWList = ReqKWList.parent_container_options,
         OptKWList = OptKWList.parent_container_options,
         ExtKWList = ExtKWList.parent_container_options,
-        
+
         ReqArgFmt = ReqArgFmt.parent_container_options,
         OptArgFmt = OptArgFmt.parent_container_options,
         ExtArgFmt = ExtArgFmt.parent_container_options,
         OptExtArgFmt = OptExtArgFmt.ExtArgFmt.parent_container_options,
         RetArgFmt = ExtArgFmt.parent_container_options,
-        
+
         ReqArgObj = ReqArgObj.parent_container_options,
         OptArgObj = OptArgObj.parent_container_options,
         ExtArgObj = ExtArgObj.parent_container_options,
@@ -443,7 +443,7 @@
 
         FromPyObj = CCode.parent_container_options,
         PyObjFrom = CCode.parent_container_options,
-        
+
         CleanPyObjFrom = dict(default='<KILLLINE>', reverse=True, use_indent=True, ignore_empty_content=True),
         CleanCBody = dict(default='<KILLLINE>', reverse=True, use_indent=True, ignore_empty_content=True),
         CleanFromPyObj = dict(default='<KILLLINE>', reverse=True, use_indent=True, ignore_empty_content=True),
@@ -457,7 +457,7 @@
         PyCArgument = 'TMP',
         CCode = 'CBody',
         )
-    
+
     def initialize(self, pyname, *components, **options):
         self.pyname = pyname
         self.title = options.pop('title', None)
@@ -483,7 +483,7 @@
         t = '  {"%(pyname)s", (PyCFunction)%(name)s, METH_VARARGS | METH_KEYWORDS, %(name)s_doc}'
         parent.cdecl.add(self.evaluate(t),'PyMethodDef')
         parent.cdecl.add(self.signature,'FunctionSignature')
-        
+
     def update_containers(self):
         self.container_OptExtArg += self.container_OptArg + self.container_ExtArg
         self.container_OptExtArgFmt += self.container_OptArgFmt + self.container_ExtArgFmt
@@ -585,7 +585,7 @@
                 if self.output_description is None:
                     self.output_description = description
         if options: self.warning('%s unused options: %s\n' % (self.__class__.__name__, options))
-        
+
         self.name = name
         self.ctype = ctype = PyCTypeSpec(ctype)
         self += ctype
@@ -613,8 +613,8 @@
             self.retpycvar = name + '_pyc_r'
 
         ctype.set_titles(self)
-        
-        map(self.add, components)        
+
+        map(self.add, components)
         return self
 
     def __repr__(self):
@@ -668,7 +668,7 @@
             pass
         else:
             raise NotImplementedError('input_intent=%r' % (self.input_intent))
-            
+
         if self.output_intent=='return':
             parent += RetArg(self.name)
             parent.signature += RetArg(self.name)
@@ -679,11 +679,11 @@
         elif self.output_intent=='hide':
             pass
         else:
-            raise NotImplementedError('output_intent=%r' % (self.output_intent))        
+            raise NotImplementedError('output_intent=%r' % (self.output_intent))
 
 class PyCReturn(PyCArgument):
 
-    def initialize(self, name, ctype = object, *components, **options):    
+    def initialize(self, name, ctype = object, *components, **options):
         return PyCArgument(name, ctype, input_intent='hide', output_intent='return', *components, **options)
 
 class PyCTypeSpec(CTypeSpec):
@@ -898,7 +898,7 @@
         c_long = (None,'long', 'l', 'l', '0'),
         c_unsigned_long = (None,'unsigned long', 'k', 'k', '0'),
         c_long_long = (None,'PY_LONG_LONG', 'L', 'L', '0'),
-        c_unsigned_long_long = (None,'unsigned PY_LONG_LONG', 'K', 'K', '0'),        
+        c_unsigned_long_long = (None,'unsigned PY_LONG_LONG', 'K', 'K', '0'),
         c_Py_ssize_t = (None,'Py_ssize_t', 'n', 'n', '0'),
         c_char1 = (None,'char', 'c', 'c', '"\\0"'),
         c_float = (None,'float', 'f', 'f', '0.0'),
@@ -911,7 +911,7 @@
     def initialize(self, typeobj):
         if isinstance(typeobj, self.__class__):
             return typeobj
-        
+
         m = self.typeinfo_map
 
         key = None
@@ -955,7 +955,7 @@
             #self.add(Component.get('import_array'), 'ModuleInit')
         if key.startswith('numeric_'):
             raise NotImplementedError(self.__class__.__name__ + ': Numeric support')
-        
+
         return self
 
     def finalize(self):
@@ -1099,6 +1099,6 @@
 def _test():
     import doctest
     doctest.testmod()
-    
+
 if __name__ == "__main__":
     _test()

Modified: trunk/numpy/f2py/lib/extgen/setup_py.py
===================================================================
--- trunk/numpy/f2py/lib/extgen/setup_py.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/lib/extgen/setup_py.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -51,7 +51,7 @@
     >>> import SetupPy_doctest as mypackage
     >>> print mypackage.foo.__doc__ #doctest: +ELLIPSIS
     This module 'foo' is generated with ExtGen from NumPy version...
-    
+
     """
     template_setup_py_start = '''\
 def configuration(parent_package='', top_path = ''):
@@ -88,7 +88,7 @@
 
         self += init_py
         self += setup_py
-        
+
         map(self.add, components)
 
         return self
@@ -115,10 +115,10 @@
             self.info('leaving %r directory' % (self.path))
         return r
 
-    
+
 def _test():
     import doctest
     doctest.testmod()
-    
+
 if __name__ == "__main__":
     _test()

Modified: trunk/numpy/f2py/lib/extgen/utils.py
===================================================================
--- trunk/numpy/f2py/lib/extgen/utils.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/lib/extgen/utils.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -104,7 +104,7 @@
       Line = 'Content',
       Code = 'Content',
     )
-    
+
     def initialize(self, path, *components, **options):
         self.path = path
         map(self.add, components)
@@ -121,6 +121,6 @@
 def _test():
     import doctest
     doctest.testmod()
-    
+
 if __name__ == "__main__":
     _test()

Modified: trunk/numpy/f2py/lib/main.py
===================================================================
--- trunk/numpy/f2py/lib/main.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/lib/main.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -418,7 +418,7 @@
                                     '--build-clib',build_dir_clib_clib,
                                     ]
     temp_dirs = [build_dir_ext_temp, build_dir_clib_temp, build_dir_clib_clib]
-        
+
     if fc_flags:
         new_sys_argv += ['config_fc'] + fc_flags
     sys.argv[:] = new_sys_argv
@@ -492,7 +492,7 @@
     if source_ext is None:
         reader = get_reader(source)
         source_ext = {'free90':'.f90','fix90':'.f90','fix77':'.f','pyf':'.pyf'}[reader.mode]
-        
+
     if modulenames is None:
         modulenames = jobname,
     if os.path.isdir(tmpdir):

Modified: trunk/numpy/f2py/lib/py_wrap_type.py
===================================================================
--- trunk/numpy/f2py/lib/py_wrap_type.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/lib/py_wrap_type.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -453,12 +453,12 @@
     0,                         /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,        /*tp_flags*/
     "Fortran derived type %(name)s objects",        /* tp_doc */
-    0,		               /* tp_traverse */
-    0,		               /* tp_clear */
-    0,		               /* tp_richcompare */
-    0,		               /* tp_weaklistoffset */
-    0,		               /* tp_iter */
-    0,		               /* tp_iternext */
+    0,                         /* tp_traverse */
+    0,                         /* tp_clear */
+    0,                         /* tp_richcompare */
+    0,                         /* tp_weaklistoffset */
+    0,                         /* tp_iter */
+    0,                         /* tp_iternext */
     %(otype)s_methods,          /* tp_methods */
     0 /*%(otype)s_members*/,    /* tp_members */
     %(otype)s_getseters,       /* tp_getset */

Modified: trunk/numpy/f2py/lib/tests/test_module_module.py
===================================================================
--- trunk/numpy/f2py/lib/tests/test_module_module.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/f2py/lib/tests/test_module_module.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -42,7 +42,7 @@
       type(rat) a
       print*,"In bar,a=",a
     end subroutine bar
-end module test_module_module_ext 
+end module test_module_module_ext
 '''
 
 m,m2 = compile(fortran_code, modulenames=['test_module_module_ext',

Modified: trunk/numpy/lib/function_base.py
===================================================================
--- trunk/numpy/lib/function_base.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/lib/function_base.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -1,7 +1,7 @@
 __docformat__ = "restructuredtext en"
 __all__ = ['logspace', 'linspace',
            'select', 'piecewise', 'trim_zeros',
-           'copy', 'iterable', 
+           'copy', 'iterable',
            'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp',
            'unique', 'extract', 'place', 'nansum', 'nanmax', 'nanargmax',
            'nanargmin', 'nanmin', 'vectorize', 'asarray_chkfinite', 'average',

Modified: trunk/numpy/lib/index_tricks.py
===================================================================
--- trunk/numpy/lib/index_tricks.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/lib/index_tricks.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -125,7 +125,7 @@
                   [2],
                   [3],
                   [4]]), array([[0, 1, 2, 3, 4]])]
-           
+
     """
     def __init__(self, sparse=False):
         self.sparse = sparse
@@ -319,7 +319,7 @@
         For example:
         >>> r_[array([1,2,3]), 0, 0, array([4,5,6])]
         array([1, 2, 3, 0, 0, 4, 5, 6])
-        
+
     """
     def __init__(self):
         concatenator.__init__(self, 0)

Modified: trunk/numpy/lib/shape_base.py
===================================================================
--- trunk/numpy/lib/shape_base.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/lib/shape_base.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -299,7 +299,7 @@
                [[2, 3]],
         <BLANKLINE>
                [[3, 4]]])
-        
+
     """
     return _nx.concatenate(map(atleast_3d,tup),2)
 

Modified: trunk/numpy/lib/tests/test_shape_base.py
===================================================================
--- trunk/numpy/lib/tests/test_shape_base.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/lib/tests/test_shape_base.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -410,4 +410,3 @@
 
 if __name__ == "__main__":
     NumpyTest().run()
- 

Modified: trunk/numpy/lib/twodim_base.py
===================================================================
--- trunk/numpy/lib/twodim_base.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/lib/twodim_base.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -143,7 +143,7 @@
         X[:,i] = x**(N-i-1)
     return X
 
-    
+
 def histogram2d(x,y, bins=10, range=None, normed=False, weights=None):
     """histogram2d(x,y, bins=10, range=None, normed=False) -> H, xedges, yedges
 
@@ -151,27 +151,27 @@
 
     :Parameters:
       - `x,y` : Sample arrays (1D).
-      - `bins` : Number of bins -or- [nbin x, nbin y] -or- 
+      - `bins` : Number of bins -or- [nbin x, nbin y] -or-
              [bin edges] -or- [x bin edges, y bin edges].
       - `range` : A sequence of lower and upper bin edges (default: [min, max]).
       - `normed` : Boolean, if False, return the number of samples in each bin,
                 if True, returns the density.
-      - `weights` : An array of weights. The weights are normed only if normed 
+      - `weights` : An array of weights. The weights are normed only if normed
                 is True. Should weights.sum() not equal N, the total bin count \
                 will not be equal to the number of samples.
-    
+
     :Return:
       - `hist` :    Histogram array.
-      - `xedges, yedges` : Arrays defining the bin edges. 
-    
+      - `xedges, yedges` : Arrays defining the bin edges.
+
     Example:
       >>> x = random.randn(100,2)
       >>> hist2d, xedges, yedges = histogram2d(x, bins = (6, 7))
-    
+
     :SeeAlso: histogramdd
     """
     from numpy import histogramdd
-    
+
     try:
         N = len(bins)
     except TypeError:

Modified: trunk/numpy/lib/type_check.py
===================================================================
--- trunk/numpy/lib/type_check.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/lib/type_check.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -7,7 +7,7 @@
 
 import numpy.core.numeric as _nx
 from numpy.core.numeric import asarray, asanyarray, array, isnan, \
-		obj2sctype, zeros
+                obj2sctype, zeros
 from ufunclike import isneginf, isposinf
 
 _typecodes_by_elsize = 'GDFgdfQqLlIiHhBb?'

Modified: trunk/numpy/lib/utils.py
===================================================================
--- trunk/numpy/lib/utils.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/lib/utils.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -118,7 +118,7 @@
     high is just *past* the last byte
 
     If the array is not single-segment, then it may not actually
-    use every byte between these bounds. 
+    use every byte between these bounds.
 
     The array provided must conform to the Python-side of the array interface
     """
@@ -140,8 +140,8 @@
                 a_high += (shape-1)*stride
         a_high += bytes_a
     return a_low, a_high
-    
 
+
 def may_share_memory(a, b):
     """Determine if two arrays can share memory
 
@@ -275,7 +275,7 @@
        Example:
           >>> from numpy import *
           >>> info(polyval) # doctest: +SKIP
-          
+
           polyval(p, x)
 
             Evaluate the polymnomial p at x.

Modified: trunk/numpy/linalg/lapack_lite/clapack_scrub.py
===================================================================
--- trunk/numpy/linalg/lapack_lite/clapack_scrub.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/linalg/lapack_lite/clapack_scrub.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -273,4 +273,3 @@
     writefo = open(outfilename, 'w')
     writefo.write(source)
     writefo.close()
-

Modified: trunk/numpy/matlib.py
===================================================================
--- trunk/numpy/matlib.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/matlib.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -45,7 +45,7 @@
 
 def randn(*args):
     if isinstance(args[0], tuple):
-       args = args[0]
+        args = args[0]
     return asmatrix(N.random.randn(*args))
 
 def repmat(a, m, n):

Modified: trunk/numpy/numarray/image.py
===================================================================
--- trunk/numpy/numarray/image.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/numarray/image.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -12,4 +12,3 @@
 installing all of SciPy from http://www.scipy.org.
 """
         raise ImportError(msg)
-

Modified: trunk/numpy/numarray/matrix.py
===================================================================
--- trunk/numpy/numarray/matrix.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/numarray/matrix.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -5,4 +5,3 @@
 
 def Matrix(data, typecode=None, copy=1, savespace=0):
     return _matrix(data, typecode, copy=copy)
-

Modified: trunk/numpy/numarray/numerictypes.py
===================================================================
--- trunk/numpy/numarray/numerictypes.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/numarray/numerictypes.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -472,25 +472,25 @@
         Complex64 : Complex64
         }
 else:
-        _MaximumType = {
-        Bool :  Int64,
+    _MaximumType = {
+    Bool :  Int64,
 
-        Int8  : Int64,
-        Int16 : Int64,
-        Int32 : Int64,
-        Int64 : Int64,
+    Int8  : Int64,
+    Int16 : Int64,
+    Int32 : Int64,
+    Int64 : Int64,
 
-        UInt8  : Int64,
-        UInt16 : Int64,
-        UInt32 : Int64,
-        UInt8  : Int64,
+    UInt8  : Int64,
+    UInt16 : Int64,
+    UInt32 : Int64,
+    UInt8  : Int64,
 
-        Float32 : Float64,
-        Float64 : Float64,
+    Float32 : Float64,
+    Float64 : Float64,
 
-        Complex32 : Complex64,
-        Complex64 : Complex64
-        }
+    Complex32 : Complex64,
+    Complex64 : Complex64
+    }
 
 def MaximumType(t):
     """returns the type of highest precision of the same general kind as 't'"""

Modified: trunk/numpy/oldnumeric/arrayfns.py
===================================================================
--- trunk/numpy/oldnumeric/arrayfns.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/oldnumeric/arrayfns.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -94,5 +94,3 @@
 
 def construct3(mask, itype):
     raise NotImplementedError
-
-

Modified: trunk/numpy/oldnumeric/ma.py
===================================================================
--- trunk/numpy/oldnumeric/ma.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/oldnumeric/ma.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -12,4 +12,3 @@
 
 def take(a, indices, axis=0):
     return nca.average(a, indices, axis=0)
-

Modified: trunk/numpy/oldnumeric/random_array.py
===================================================================
--- trunk/numpy/oldnumeric/random_array.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/oldnumeric/random_array.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -81,13 +81,13 @@
     """multivariate_normal(mean, cov) or multivariate_normal(mean, cov, [m, n, ...])
     returns an array containing multivariate normally distributed random numbers
     with specified mean and covariance.
-    
+
     mean must be a 1 dimensional array. cov must be a square two dimensional
     array with the same number of rows and columns as mean has elements.
-    
+
     The first form returns a single 1-D array containing a multivariate
     normal.
-    
+
     The second form returns an array of shape (m, n, ..., cov.shape[0]).
     In this case, output[i,j,...,:] is a 1-D array containing a multivariate
     normal."""

Modified: trunk/numpy/testing/numpytest.py
===================================================================
--- trunk/numpy/testing/numpytest.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/numpy/testing/numpytest.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -296,10 +296,10 @@
     def rename(self, **kws):
         """Apply renaming submodule test file test_<name>.py to
         test_<newname>.py.
-        
+
         Usage: self.rename(name='newname') before calling the
         self.test() method.
-        
+
         If 'newname' is None, then no tests will be executed for a given
         module.
         """

Modified: trunk/setup.py
===================================================================
--- trunk/setup.py	2007-10-29 14:43:48 UTC (rev 4331)
+++ trunk/setup.py	2007-10-29 14:58:18 UTC (rev 4332)
@@ -45,12 +45,12 @@
                        assume_default_configuration=True,
                        delegate_options_to_subpackages=True,
                        quiet=True)
-    
+
     config.add_subpackage('numpy')
-        
+
     config.add_data_files(('numpy','*.txt'),
                           ('numpy','COMPATIBILITY'),
-                          ('numpy','scipy_compatibility'), 
+                          ('numpy','scipy_compatibility'),
                           ('numpy','site.cfg.example'))
 
     config.get_version('numpy/version.py') # sets config.version
@@ -79,7 +79,7 @@
             classifiers=filter(None, CLASSIFIERS.split('\n')),
             author = "Travis E. Oliphant, et.al.",
             author_email = "oliphant at ee.byu.edu",
-            platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],            
+            platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
             configuration=configuration )
     finally:
         del sys.path[0]




More information about the Numpy-svn mailing list