diff options
-rw-r--r-- | scipy/__init__.py | 7 | ||||
-rw-r--r-- | scipy/_import_tools.py | 16 | ||||
-rw-r--r-- | scipy/base/records.py | 10 |
3 files changed, 16 insertions, 17 deletions
diff --git a/scipy/__init__.py b/scipy/__init__.py index 23f026af2..c1b429dfd 100644 --- a/scipy/__init__.py +++ b/scipy/__init__.py @@ -16,7 +16,7 @@ Available subpackages --------------------- """ -import os +import os, sys NO_SCIPY_IMPORT = os.environ.get('NO_SCIPY_IMPORT',None) try: @@ -25,7 +25,7 @@ except ImportError: show_core_config = None if show_core_config is None: - print 'Running from scipy core source directory.' + print >> sys.stderr, 'Running from scipy core source directory.' else: from _import_tools import PackageImport from core_version import version as __core_version__ @@ -43,7 +43,7 @@ Available subpackages """ if NO_SCIPY_IMPORT is not None: - print 'Skip importing scipy packages (NO_SCIPY_IMPORT=%s)' % (NO_SCIPY_IMPORT) + print >> sys.stderr, 'Skip importing scipy packages (NO_SCIPY_IMPORT=%s)' % (NO_SCIPY_IMPORT) show_scipy_config = None elif show_core_config is None: show_scipy_config = None @@ -58,3 +58,4 @@ if show_scipy_config is not None: from scipy_version import scipy_version as __scipy_version__ __doc__ += __scipy_doc__ __doc__ += PackageImport().import_packages() + diff --git a/scipy/_import_tools.py b/scipy/_import_tools.py index 8a689c86d..68c14c638 100644 --- a/scipy/_import_tools.py +++ b/scipy/_import_tools.py @@ -35,7 +35,7 @@ class PackageImport: info_file, ('.py','U',1)) except Exception,msg: - print msg + print >> sys.stderr, msg info_module = None if info_module is None: @@ -116,11 +116,11 @@ class PackageImport: postpone_import = getattr(info_module,'postpone_import',True) try: - print 'Importing',package_name,'to',self.parent_name + #print 'Importing',package_name,'to',self.parent_name exec ('import '+package_name, frame.f_globals,frame.f_locals) except Exception,msg: - print 'Failed to import',package_name - print msg + print >> sys.stderr, 'Failed to import',package_name + print >> sys.stderr, msg continue self.imported_packages.append(fullname) @@ -130,8 +130,8 @@ class PackageImport: exec ('from '+package_name+' import '+symbol, frame.f_globals,frame.f_locals) except Exception,msg: - print 'Failed to import',symbol,'from',package_name - print msg + print >> sys.stderr, 'Failed to import',symbol,'from',package_name + print >> sys.stderr, msg continue titles.append((fullname,self._get_doc_title(info_module))) @@ -141,7 +141,7 @@ class PackageImport: % (package_name,package_name), frame.f_globals,frame.f_locals) except Exception,msg: - print 'Failed to set test function for',package_name - print msg + print >> sys.stderr, 'Failed to set test function for',package_name + print >> sys.stderr, msg return self._format_titles(titles) diff --git a/scipy/base/records.py b/scipy/base/records.py index ca823ed99..25503826b 100644 --- a/scipy/base/records.py +++ b/scipy/base/records.py @@ -1,4 +1,4 @@ -__all__ = ['record', 'ndrecarray','format_parser'] +__all__ = ['record', 'recarray','format_parser'] import numeric as sb import numerictypes as nt @@ -14,10 +14,8 @@ format_re = re.compile(r'(?P<repeat> *[(]?[ ,0-9]*[)]? *)(?P<dtype>[A-Za-z0-9.]* numfmt = nt.typeDict - - def find_duplicate(list): - """Find duplication in a list, return a list of dupicated elements""" + """Find duplication in a list, return a list of duplicated elements""" dup = [] for i in range(len(list)): if (list[i] in list[i+1:]): @@ -244,13 +242,13 @@ class record(nt.void): return self.setfield(val, *(self.fields[obj][:2])) -# The ndrecarray is almost identical to a standard array (which supports +# The recarray is almost identical to a standard array (which supports # named fields already) The biggest difference is that it is always of # record data-type, has fields, and can use attribute-lookup to access # those fields. -class ndrecarray(sb.ndarray): +class recarray(sb.ndarray): def __new__(subtype, shape, formats, names=None, titles=None, buf=None, offset=0, strides=None, swap=0, aligned=0): |