human
Complete the below
def assert_numpy_array_equal(left, right, strict_nan=False, check_dtype=True, err_msg=None, obj='numpy    array', check_same=None):

    ''''Checks that \'np.ndarray\' is equivalent
    Parameters
    left : np.ndarray or iterable
    right : np.ndarray or iterable
    strict_nan : bool, default False
    If True, consider NaN and None to be different.
    check_dtype: bool, default True
    check dtype if both a and b are np.ndarray
    err_msg : str, default None
    If provided, used as assertion message
    obj : str, default \'numpy array\'
    Specify object name being compared, internally used to show appropriate
    assertion message
    check_same : None|\'copy\'|\'same\', default None
    Ensure left and right refer/do not refer to the same memory area'
    '''

What is a the Python code you requested?
assistant
#Here is the Python code you requested.
    assert_class_equal(left, right, obj=obj)
    _check_isinstance(left, right, np.ndarray)
    def _get_base(obj):
        return (obj.base if (getattr(obj, 'base', None) is not None) else obj)
    left_base = _get_base(left)
    right_base = _get_base(right)
    if (check_same == 'same'):
        if (left_base is not right_base):
            msg = ('%r    is    not    %r' % (left_base, right_base))
            raise AssertionError(msg)
    elif (check_same == 'copy'):
        if (left_base is right_base):
            msg = ('%r    is    %r' % (left_base, right_base))
            raise AssertionError(msg)
    def _raise(left, right, err_msg):
        if (err_msg is None):
            if (left.shape != right.shape):
                raise_assert_detail(obj, '{0}    shapes    are    different'.format(obj), left.shape, right.shape)
            diff = 0
            for (l, r) in zip(left, right):
                if (not array_equivalent(l, r, strict_nan=strict_nan)):
                    diff += 1
            diff = ((diff * 100.0) / left.size)
            msg = '{0}    values    are    different    ({1}    %)'.format(obj, np.round(diff, 5))
            raise_assert_detail(obj, msg, left, right)
        raise AssertionError(err_msg)
    if (not array_equivalent(left, right, strict_nan=strict_nan)):
        _raise(left, right, err_msg)
    if check_dtype:
        if (isinstance(left, np.ndarray) and isinstance(right, np.ndarray)):
            assert_attr_equal('dtype', left, right, obj=obj)
    return True