diff options
author | Pauli Virtanen <pav@iki.fi> | 2009-12-06 12:15:28 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2009-12-06 12:15:28 +0000 |
commit | 61d0bd66242a33da1f05364f45220e067e9e1b73 (patch) | |
tree | 6d81b9ccb608210a34ba0f9ba4d818ced6d0dd17 /numpy/core/numeric.py | |
parent | a875834aa90900fc47a51939e4fa0686deb8599a (diff) | |
download | numpy-61d0bd66242a33da1f05364f45220e067e9e1b73.tar.gz |
3K: core: Remove 'getbuffer' and 'newbuffer' from multiarray in Py3
Py3 has the new memoryview object, which should obsolete these
functions.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index dd3ee1de5..e35fca07b 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1,7 +1,7 @@ __all__ = ['newaxis', 'ndarray', 'flatiter', 'ufunc', 'arange', 'array', 'zeros', 'empty', 'broadcast', 'dtype', - 'fromstring', 'fromfile', 'frombuffer','newbuffer', - 'getbuffer', 'int_asbuffer', 'where', 'argwhere', + 'fromstring', 'fromfile', 'frombuffer', + 'int_asbuffer', 'where', 'argwhere', 'concatenate', 'fastCopyAndTranspose', 'lexsort', 'set_numeric_ops', 'can_cast', 'asarray', 'asanyarray', 'ascontiguousarray', 'asfortranarray', @@ -29,6 +29,9 @@ from umath import * import numerictypes from numerictypes import * +if sys.version_info[0] < 3: + __all__.extend(['getbuffer', 'newbuffer']) + bitwise_not = invert CLIP = multiarray.CLIP @@ -186,8 +189,9 @@ fromstring = multiarray.fromstring fromiter = multiarray.fromiter fromfile = multiarray.fromfile frombuffer = multiarray.frombuffer -newbuffer = multiarray.newbuffer -getbuffer = multiarray.getbuffer +if sys.version_info[0] < 3: + newbuffer = multiarray.newbuffer + getbuffer = multiarray.getbuffer int_asbuffer = multiarray.int_asbuffer where = multiarray.where concatenate = multiarray.concatenate |