@@ -592,12 +592,17 @@ def numpy_cupy_allclose(
592592 # "must be supplied as float."
593593 # )
594594
595- def check_func (c , n , ** test_kwargs ):
595+ def check_func (cupy_result , numpy_result , ** test_kwargs ):
596596 rtol1 , atol1 = _resolve_tolerance (
597- type_check , c , rtol , atol , ** test_kwargs
597+ type_check , cupy_result , rtol , atol , ** test_kwargs
598598 )
599599 _array .assert_allclose (
600- c , n , rtol1 , atol1 , err_msg = err_msg , verbose = verbose
600+ cupy_result ,
601+ numpy_result ,
602+ rtol1 ,
603+ atol1 ,
604+ err_msg = err_msg ,
605+ verbose = verbose ,
601606 )
602607
603608 return _make_decorator (
@@ -652,8 +657,10 @@ def numpy_cupy_array_almost_equal(
652657 .. seealso:: :func:`cupy.testing.assert_array_almost_equal`
653658 """
654659
655- def check_func (x , y , ** test_kwargs ):
656- _array .assert_array_almost_equal (x , y , decimal , err_msg , verbose )
660+ def check_func (cupy_result , numpy_result , ** test_kwargs ):
661+ _array .assert_array_almost_equal (
662+ cupy_result , numpy_result , decimal , err_msg , verbose
663+ )
657664
658665 return _make_decorator (
659666 check_func , name , type_check , False , accept_error , sp_name , scipy_name
@@ -695,8 +702,8 @@ def numpy_cupy_array_almost_equal_nulp(
695702 .. seealso:: :func:`cupy.testing.assert_array_almost_equal_nulp`
696703 """
697704
698- def check_func (x , y , ** test_kwargs ):
699- _array .assert_array_almost_equal_nulp (x , y , nulp )
705+ def check_func (cupy_result , numpy_result , ** test_kwargs ):
706+ _array .assert_array_almost_equal_nulp (cupy_result , numpy_result , nulp )
700707
701708 return _make_decorator (
702709 check_func ,
@@ -749,8 +756,8 @@ def numpy_cupy_array_max_ulp(
749756
750757 """
751758
752- def check_func (x , y , ** test_kwargs ):
753- _array .assert_array_max_ulp (x , y , maxulp , dtype )
759+ def check_func (cupy_result , numpy_result , ** test_kwargs ):
760+ _array .assert_array_max_ulp (cupy_result , numpy_result , maxulp , dtype )
754761
755762 return _make_decorator (
756763 check_func , name , type_check , False , accept_error , sp_name , scipy_name
@@ -798,9 +805,13 @@ def numpy_cupy_array_equal(
798805 .. seealso:: :func:`cupy.testing.assert_array_equal`
799806 """
800807
801- def check_func (x , y , ** test_kwargs ):
808+ def check_func (cupy_result , numpy_result , ** test_kwargs ):
802809 _array .assert_array_equal (
803- x , y , err_msg , verbose , strides_check = strides_check
810+ cupy_result ,
811+ numpy_result ,
812+ err_msg ,
813+ verbose ,
814+ strides_check = strides_check ,
804815 )
805816
806817 return _make_decorator (
@@ -837,8 +848,8 @@ def numpy_cupy_array_list_equal(
837848 DeprecationWarning ,
838849 )
839850
840- def check_func (x , y , ** test_kwargs ):
841- _array .assert_array_equal (x , y , err_msg , verbose )
851+ def check_func (cupy_result , numpy_result , ** test_kwargs ):
852+ _array .assert_array_equal (cupy_result , numpy_result , err_msg , verbose )
842853
843854 return _make_decorator (
844855 check_func , name , False , False , False , sp_name , scipy_name
@@ -882,8 +893,8 @@ def numpy_cupy_array_less(
882893 .. seealso:: :func:`cupy.testing.assert_array_less`
883894 """
884895
885- def check_func (x , y , ** test_kwargs ):
886- _array .assert_array_less (x , y , err_msg , verbose )
896+ def check_func (cupy_result , numpy_result , ** test_kwargs ):
897+ _array .assert_array_less (cupy_result , numpy_result , err_msg , verbose )
887898
888899 return _make_decorator (
889900 check_func , name , type_check , False , accept_error , sp_name , scipy_name
0 commit comments