summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/compat.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-08-05 18:02:33 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-08-05 18:02:33 +0000
commit0072bd2837bcc89928fcc58e8ede88edbe1dcccd (patch)
tree3858e82df033f84f87689af64859b7963905bd54 /numpy/oldnumeric/compat.py
parent6983e3f24e6ca214347012652fbf65cb01cf6e5b (diff)
downloadnumpy-0072bd2837bcc89928fcc58e8ede88edbe1dcccd.tar.gz
Un-deprecate some names in Numeric.
Diffstat (limited to 'numpy/oldnumeric/compat.py')
-rw-r--r--numpy/oldnumeric/compat.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/numpy/oldnumeric/compat.py b/numpy/oldnumeric/compat.py
index 69941bb09..98a7f9259 100644
--- a/numpy/oldnumeric/compat.py
+++ b/numpy/oldnumeric/compat.py
@@ -2,11 +2,9 @@
__all__ = ['NewAxis',
'UFuncType', 'UfuncType', 'ArrayType', 'arraytype',
- 'LittleEndian',
- 'sarray', 'arrayrange', 'cross_correlate',
- 'matrixmultiply', 'outerproduct', 'innerproduct',
- 'cross_product', 'array_constructor', 'pickle_array',
- 'DumpArray', 'LoadArray', 'multiarray', 'divide_safe',
+ 'LittleEndian', 'arrayrange', 'matrixmultiply',
+ 'array_constructor', 'pickle_array',
+ 'DumpArray', 'LoadArray', 'multiarray',
# from cPickle
'dump', 'dumps'
]
@@ -15,15 +13,13 @@ import numpy.core.multiarray as multiarray
import numpy.core.umath as um
from numpy.core.numeric import array, correlate, outer, cross
from numpy.core.umath import sign, absolute, multiply
+import functions
import sys
import types
from cPickle import dump, dumps
-def sarray(a, dtype=None, copy=False):
- return array(a, dtype, copy)
-
mu = multiarray
#Use this to add a new axis to an array
@@ -41,16 +37,10 @@ LittleEndian = (sys.byteorder == 'little')
from numpy import deprecate
# backward compatibility
-arrayrange = deprecate(mu.arange, 'arrayrange', 'arange')
-cross_correlate = deprecate(correlate, 'cross_correlate', 'correlate')
-cross_product = deprecate(cross, 'cross_product', 'cross')
-divide_safe = deprecate(um.divide, 'divide_safe', 'divide')
+arrayrange = deprecate(functions.arange, 'arrayrange', 'arange')
# deprecated names
matrixmultiply = deprecate(mu.dot, 'matrixmultiply', 'dot')
-outerproduct = deprecate(outer, 'outerproduct', 'outer')
-innerproduct = deprecate(mu.inner, 'innerproduct', 'inner')
-
def DumpArray(m, fp):
m.dump(fp)