summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py32
1 files changed, 1 insertions, 31 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index f94abeeab..0e4300585 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -11,7 +11,7 @@ from numpy.core import product, ndarray, ufunc
__all__ = ['issubclass_', 'issubsctype', 'issubdtype',
'deprecate', 'deprecate_with_doc', 'get_numarray_include',
'get_include', 'info', 'source', 'who', 'lookfor', 'byte_bounds',
- 'may_share_memory', 'safe_eval']
+ 'safe_eval']
def get_include():
"""
@@ -266,36 +266,6 @@ def byte_bounds(a):
return a_low, a_high
-def may_share_memory(a, b):
- """
- Determine if two arrays can share memory
-
- The memory-bounds of a and b are computed. If they overlap then
- this function returns True. Otherwise, it returns False.
-
- A return of True does not necessarily mean that the two arrays
- share any element. It just means that they *might*.
-
- Parameters
- ----------
- a, b : ndarray
-
- Returns
- -------
- out : bool
-
- Examples
- --------
- >>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))
- False
-
- """
- a_low, a_high = byte_bounds(a)
- b_low, b_high = byte_bounds(b)
- if b_low >= a_high or a_low >= b_high:
- return False
- return True
-
#-----------------------------------------------------------------------------
# Function for output and information on the variables used.
#-----------------------------------------------------------------------------