1.6.173. numpy.may_share_memory¶
-
numpy.may_share_memory()¶ 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