summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/__init__.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-08-05 01:20:56 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-08-05 01:20:56 +0000
commit9d8e2024ff9014fa2fd9a29812cec615dff6feb9 (patch)
treee6353aeb1f9f90e6011ad830a5f3b140b1120435 /numpy/oldnumeric/__init__.py
parent9d98d9d5e3668d3b8da3bb3019a28d6e945d6fad (diff)
downloadnumpy-9d8e2024ff9014fa2fd9a29812cec615dff6feb9.tar.gz
More fixes to backward compatibility
Diffstat (limited to 'numpy/oldnumeric/__init__.py')
-rw-r--r--numpy/oldnumeric/__init__.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/numpy/oldnumeric/__init__.py b/numpy/oldnumeric/__init__.py
index 14895910f..ced329913 100644
--- a/numpy/oldnumeric/__init__.py
+++ b/numpy/oldnumeric/__init__.py
@@ -2,14 +2,26 @@
# Don't add these to the __all__ variable
from numpy import *
+def _move_axis_to_0(a, axis):
+ if axis == 0:
+ return a
+ n = len(a.shape)
+ if axis < 0:
+ axis += n
+ axes = range(1, axis+1) + [0,] + range(axis+1, n)
+ return transpose(a, axes)
+
# Add these
from compat import *
-from olddefaults import *
from functions import *
+from precision import *
+from ufuncs import *
import compat
-import olddefaults
+import precision
import functions
+import misc
+import ufuncs
import numpy
__version__ = numpy.__version__
@@ -17,9 +29,13 @@ del numpy
__all__ = ['__version__']
__all__ += compat.__all__
-__all__ += olddefaults.__all__
+__all__ += precision.__all__
__all__ += functions.__all__
+__all__ += ufuncs.__all__
+__all__ += misc.__all__
del compat
-del olddefaults
del functions
+del precision
+del ufuncs
+del misc