diff options
author | Pauli Virtanen <pav@iki.fi> | 2015-08-11 23:39:42 +0300 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2015-08-29 18:19:34 +0300 |
commit | 2b66f00bed834b2569bf22c0c519dad0bf5d5bda (patch) | |
tree | aff0e40d5e69654ce25c2455fd33d2ff289edfe9 /numpy/core/numeric.py | |
parent | c317180bf167a68f3c5051b6ccd5e15023e09d91 (diff) | |
download | numpy-2b66f00bed834b2569bf22c0c519dad0bf5d5bda.tar.gz |
ENH: add shares_memory, implement may_share_memory using it
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index f0163876f..1b7dfca3e 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -10,6 +10,7 @@ from .umath import (invert, sin, UFUNC_BUFSIZE_DEFAULT, ERR_IGNORE, ERR_DEFAULT, PINF, NAN) from . import numerictypes from .numerictypes import longlong, intc, int_, float_, complex_, bool_ +from ._internal import TooHardError if sys.version_info[0] >= 3: import pickle @@ -39,8 +40,8 @@ __all__ = [ 'getbufsize', 'seterrcall', 'geterrcall', 'errstate', 'flatnonzero', 'Inf', 'inf', 'infty', 'Infinity', 'nan', 'NaN', 'False_', 'True_', 'bitwise_not', 'CLIP', 'RAISE', 'WRAP', 'MAXDIMS', 'BUFSIZE', - 'ALLOW_THREADS', 'ComplexWarning', 'may_share_memory', 'full', - 'full_like', 'matmul', + 'ALLOW_THREADS', 'ComplexWarning', 'full', 'full_like', 'matmul', + 'shares_memory', 'MAY_SHARE_BOUNDS', 'MAY_SHARE_EXACT', 'TooHardError', ] if sys.version_info[0] < 3: @@ -65,6 +66,8 @@ RAISE = multiarray.RAISE MAXDIMS = multiarray.MAXDIMS ALLOW_THREADS = multiarray.ALLOW_THREADS BUFSIZE = multiarray.BUFSIZE +MAY_SHARE_BOUNDS = multiarray.MAY_SHARE_BOUNDS +MAY_SHARE_EXACT = multiarray.MAY_SHARE_EXACT ndarray = multiarray.ndarray flatiter = multiarray.flatiter @@ -375,7 +378,7 @@ fromstring = multiarray.fromstring fromiter = multiarray.fromiter fromfile = multiarray.fromfile frombuffer = multiarray.frombuffer -may_share_memory = multiarray.may_share_memory +shares_memory = multiarray.shares_memory if sys.version_info[0] < 3: newbuffer = multiarray.newbuffer getbuffer = multiarray.getbuffer |