@array_function_from_c_func_and_dispatcher(_multiarray_umath.shares_memory)
def shares_memory(a, b, max_work=None):
    '\n    shares_memory(a, b, max_work=None)\n\n    Determine if two arrays share memory\n\n    Parameters\n    ----------\n    a, b : ndarray\n        Input arrays\n    max_work : int, optional\n        Effort to spend on solving the overlap problem (maximum number\n        of candidate solutions to consider). The following special\n        values are recognized:\n\n        max_work=MAY_SHARE_EXACT  (default)\n            The problem is solved exactly. In this case, the function returns\n            True only if there is an element shared between the arrays.\n        max_work=MAY_SHARE_BOUNDS\n            Only the memory bounds of a and b are checked.\n\n    Raises\n    ------\n    numpy.TooHardError\n        Exceeded max_work.\n\n    Returns\n    -------\n    out : bool\n\n    See Also\n    --------\n    may_share_memory\n\n    Examples\n    --------\n    >>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))\n    False\n\n    '
    return (a, b)
shares_memory(a, b, max_work=None)

Determine if two arrays share memory

Parameters
----------
a, b : ndarray
    Input arrays
max_work : int, optional
    Effort to spend on solving the overlap problem (maximum number
    of candidate solutions to consider). The following special
    values are recognized:

    max_work=MAY_SHARE_EXACT  (default)
        The problem is solved exactly. In this case, the function returns
        True only if there is an element shared between the arrays.
    max_work=MAY_SHARE_BOUNDS
        Only the memory bounds of a and b are checked.

Raises
------
numpy.TooHardError
    Exceeded max_work.

Returns
-------
out : bool

See Also
--------
may_share_memory

Examples
--------
>>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))
False
@array_function_from_c_func_and_dispatcher(_multiarray_umath.shares_memory)
def shares_memory(a, b, max_work=None):
    '\n    shares_memory(a, b, max_work=None)\n\n    Determine if two arrays share memory\n\n    Parameters\n    ----------\n    a, b : ndarray\n        Input arrays\n    max_work : int, optional\n        Effort to spend on solving the overlap problem (maximum number\n        of candidate solutions to consider). The following special\n        values are recognized:\n\n        max_work=MAY_SHARE_EXACT  (default)\n            The problem is solved exactly. In this case, the function returns\n            True only if there is an element shared between the arrays.\n        max_work=MAY_SHARE_BOUNDS\n            Only the memory bounds of a and b are checked.\n\n    Raises\n    ------\n    numpy.TooHardError\n        Exceeded max_work.\n\n    Returns\n    -------\n    out : bool\n\n    See Also\n    --------\n    may_share_memory\n\n    Examples\n    --------\n    >>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))\n    False\n\n    '
    return (a, b)