[Scipy-svn] r4446 - trunk/scipy
scipy-svn at scipy.org
scipy-svn at scipy.org
Mon Jun 16 21:19:09 EDT 2008
Author: rkern
Date: 2008-06-16 20:19:04 -0500 (Mon, 16 Jun 2008)
New Revision: 4446
Modified:
trunk/scipy/__init__.py
Log:
BUG: Ensure that no subpackage name is added to scipy.__all__.
Modified: trunk/scipy/__init__.py
===================================================================
--- trunk/scipy/__init__.py 2008-06-13 03:16:04 UTC (rev 4445)
+++ trunk/scipy/__init__.py 2008-06-17 01:19:04 UTC (rev 4446)
@@ -44,6 +44,7 @@
# Remove the linalg imported from numpy so that the scipy.linalg package can be
# imported.
del linalg
+__all__.remove('linalg')
try:
from __config__ import show as show_config
@@ -61,6 +62,20 @@
del _os
pkgload = PackageLoader()
pkgload(verbose=SCIPY_IMPORT_VERBOSE,postpone=True)
+
+# Remove subpackage names from __all__ such that they are not imported via
+# "from scipy import *". This works around a numpy bug present in < 1.2.
+subpackages = """cluster constants fftpack integrate interpolate io lib linalg
+linsolve maxentropy misc ndimage odr optimize sandbox signal sparse special
+splinalg stats stsci testing weave""".split()
+for name in subpackages:
+ try:
+ __all__.remove(name)
+ except ValueError:
+ pass
+
+del name, subpackages
+
__doc__ += """
Available subpackages
More information about the Scipy-svn
mailing list