data-apis / array-api-compat

Compatibility layer for common array libraries to support the Array API
https://data-apis.org/array-api-compat/
MIT License
69 stars 22 forks source link

CuPy array-api-tests 2023 test failures #161

Open asmeurer opened 1 month ago

asmeurer commented 1 month ago

Pasting these here as they aren't easy to re-run

==================================================================================================== FAILURES =====================================================================================================
___________________________________________________________________________________ test_has_names[statistical-cumulative_sum] ____________________________________________________________________________________

category = 'statistical', name = 'cumulative_sum'

    @pytest.mark.parametrize("category, name", has_name_params)
    def test_has_names(category, name):
        if category in EXTENSIONS:
            ext_mod = getattr(xp, category)
            assert hasattr(ext_mod, name), f"{xp.__name__} is missing the {category} extension function {name}()"
        elif category.startswith('array_'):
            # TODO: This would fail if ones() is missing.
            arr = xp.ones((1, 1))
            if category == 'array_attribute':
                assert hasattr(arr, name), f"The {xp.__name__} array object is missing the attribute {name}"
            else:
                assert hasattr(arr, name), f"The {xp.__name__} array object is missing the method {name}()"
        else:
>           assert hasattr(xp, name), f"{xp.__name__} is missing the {category} function {name}()"
E           AssertionError: array_api_compat.cupy is missing the statistical function cumulative_sum()
E           assert False
E            +  where False = hasattr(xp, 'cumulative_sum')

array_api_tests/test_has_names.py:37: AssertionError
______________________________________________________________________________________ test_has_names[manipulation-unstack] _______________________________________________________________________________________

category = 'manipulation', name = 'unstack'

    @pytest.mark.parametrize("category, name", has_name_params)
    def test_has_names(category, name):
        if category in EXTENSIONS:
            ext_mod = getattr(xp, category)
            assert hasattr(ext_mod, name), f"{xp.__name__} is missing the {category} extension function {name}()"
        elif category.startswith('array_'):
            # TODO: This would fail if ones() is missing.
            arr = xp.ones((1, 1))
            if category == 'array_attribute':
                assert hasattr(arr, name), f"The {xp.__name__} array object is missing the attribute {name}"
            else:
                assert hasattr(arr, name), f"The {xp.__name__} array object is missing the method {name}()"
        else:
>           assert hasattr(xp, name), f"{xp.__name__} is missing the {category} function {name}()"
E           AssertionError: array_api_compat.cupy is missing the manipulation function unstack()
E           assert False
E            +  where False = hasattr(xp, 'unstack')

array_api_tests/test_has_names.py:37: AssertionError
__________________________________________________________________________________ test_has_names[info-__array_namespace_info__] __________________________________________________________________________________

category = 'info', name = '__array_namespace_info__'

    @pytest.mark.parametrize("category, name", has_name_params)
    def test_has_names(category, name):
        if category in EXTENSIONS:
            ext_mod = getattr(xp, category)
            assert hasattr(ext_mod, name), f"{xp.__name__} is missing the {category} extension function {name}()"
        elif category.startswith('array_'):
            # TODO: This would fail if ones() is missing.
            arr = xp.ones((1, 1))
            if category == 'array_attribute':
                assert hasattr(arr, name), f"The {xp.__name__} array object is missing the attribute {name}"
            else:
                assert hasattr(arr, name), f"The {xp.__name__} array object is missing the method {name}()"
        else:
>           assert hasattr(xp, name), f"{xp.__name__} is missing the {category} function {name}()"
E           AssertionError: array_api_compat.cupy is missing the info function __array_namespace_info__()
E           assert False
E            +  where False = hasattr(xp, '__array_namespace_info__')

array_api_tests/test_has_names.py:37: AssertionError
____________________________________________________________________________________________ test_array_namespace_info ____________________________________________________________________________________________

    def test_array_namespace_info():
>       out = xp.__array_namespace_info__()
E       AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_inspection_functions.py:10: AttributeError
________________________________________________________________________________________ test_array_namespace_info_dtypes _________________________________________________________________________________________

    @given(
>       st.one_of(
            st.none(),
            st.sampled_from(atomic_kinds + ["integral", "numeric"]),
            st.lists(st.sampled_from(atomic_kinds), unique=True, min_size=1).map(tuple),
        )
    )

array_api_tests/test_inspection_functions.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

kind = None

    @given(
        st.one_of(
            st.none(),
            st.sampled_from(atomic_kinds + ["integral", "numeric"]),
            st.lists(st.sampled_from(atomic_kinds), unique=True, min_size=1).map(tuple),
        )
    )
    def test_array_namespace_info_dtypes(kind):
>       out = xp.__array_namespace_info__().dtypes(kind=kind)
E       AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'
E       Falsifying example: test_array_namespace_info_dtypes(
E           kind=None,  # or any other generated value
E       )

array_api_tests/test_inspection_functions.py:42: AttributeError
_______________________________________________________________________________________________ test_linalg_matmul ________________________________________________________________________________________________
  + Exception Group Traceback (most recent call last):
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/runner.py", line 342, in from_call
  |     result: Optional[TResult] = func()
  |                                 ^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/runner.py", line 263, in <lambda>
  |     lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  |             ^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_hooks.py", line 501, in __call__
  |     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_manager.py", line 119, in _hookexec
  |     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 181, in _multicall
  |     return outcome.get_result()
  |            ^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_result.py", line 99, in get_result
  |     raise exc.with_traceback(exc.__traceback__)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
  |     yield from thread_exception_runtest_hook()
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
  |     yield
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
  |     yield from unraisable_exception_runtest_hook()
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
  |     yield
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/logging.py", line 839, in pytest_runtest_call
  |     yield from self._runtest_for(item, "call")
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/logging.py", line 822, in _runtest_for
  |     yield
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/capture.py", line 882, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/skipping.py", line 256, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 102, in _multicall
  |     res = hook_impl.function(*args)
  |           ^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/runner.py", line 178, in pytest_runtest_call
  |     raise e
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/runner.py", line 170, in pytest_runtest_call
  |     item.runtest()
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/python.py", line 1831, in runtest
  |     self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_hooks.py", line 501, in __call__
  |     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_manager.py", line 119, in _hookexec
  |     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 138, in _multicall
  |     raise exception.with_traceback(exception.__traceback__)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 102, in _multicall
  |     res = hook_impl.function(*args)
  |           ^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
  |     result = testfunction(**testargs)
  |              ^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/Documents/array-api-tests/array_api_tests/test_linalg.py", line 385, in test_linalg_matmul
  |     @pytest.mark.xp_extension('linalg')
  |                    ^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 1699, in wrapped_test
  |     raise the_error_hypothesis_found
  | hypothesis.errors.FlakyFailure: Hypothesis test_linalg_matmul(x1=array([[31]], dtype=uint16), x2=array([[[[[-8658]]]]], dtype=int32)) produces unreliable results: Falsified on the first call but did not on a subsequent one (1 sub-exception)
  | Falsifying example: test_linalg_matmul(
  |     x1=array([[31]], dtype=uint16),
  |     x2=array([[[[[-8658]]]]], dtype=int32),
  | )
  | Unreliable test timings! On an initial run, this test took 1354.79ms, which exceeded the deadline of 800.00ms, but on a subsequent run it took 0.98 ms, which did not. If you expect this sort of variability in your test timings, consider turning deadlines off for this test by setting deadline=None.
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 1045, in _execute_once_for_engine
    |     result = self.execute_once(data)
    |              ^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 975, in execute_once
    |     result = self.test_runner(data, run)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 739, in default_executor
    |     return function(data)
    |            ^^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 950, in run
    |     return test(*args, **kwargs)
    |            ^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/Documents/array-api-tests/array_api_tests/test_linalg.py", line 385, in test_linalg_matmul
    |     @pytest.mark.xp_extension('linalg')
    |                    ^^^^^^^^^
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 873, in test
    |     raise DeadlineExceeded(
    | hypothesis.errors.DeadlineExceeded: Test took 1354.79ms, which exceeds the deadline of 800.00ms
    +------------------------------------
______________________________________________________________________________________________ test_linalg_tensordot ______________________________________________________________________________________________
  + Exception Group Traceback (most recent call last):
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/runner.py", line 342, in from_call
  |     result: Optional[TResult] = func()
  |                                 ^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/runner.py", line 263, in <lambda>
  |     lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  |             ^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_hooks.py", line 501, in __call__
  |     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_manager.py", line 119, in _hookexec
  |     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 181, in _multicall
  |     return outcome.get_result()
  |            ^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_result.py", line 99, in get_result
  |     raise exc.with_traceback(exc.__traceback__)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
  |     yield from thread_exception_runtest_hook()
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
  |     yield
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
  |     yield from unraisable_exception_runtest_hook()
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
  |     yield
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/logging.py", line 839, in pytest_runtest_call
  |     yield from self._runtest_for(item, "call")
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/logging.py", line 822, in _runtest_for
  |     yield
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/capture.py", line 882, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 166, in _multicall
  |     teardown.throw(outcome._exception)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/skipping.py", line 256, in pytest_runtest_call
  |     return (yield)
  |             ^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 102, in _multicall
  |     res = hook_impl.function(*args)
  |           ^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/runner.py", line 178, in pytest_runtest_call
  |     raise e
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/runner.py", line 170, in pytest_runtest_call
  |     item.runtest()
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/python.py", line 1831, in runtest
  |     self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_hooks.py", line 501, in __call__
  |     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_manager.py", line 119, in _hookexec
  |     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 138, in _multicall
  |     raise exception.with_traceback(exception.__traceback__)
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/pluggy/_callers.py", line 102, in _multicall
  |     res = hook_impl.function(*args)
  |           ^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
  |     result = testfunction(**testargs)
  |              ^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/aaronmeurer/Documents/array-api-tests/array_api_tests/test_linalg.py", line 844, in test_linalg_tensordot
  |     @pytest.mark.xp_extension('linalg')
  |                    ^^^
  |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 1699, in wrapped_test
  |     raise the_error_hypothesis_found
  | hypothesis.errors.FlakyFailure: Hypothesis test_linalg_tensordot(x1=array([[-100992768],
  |        [      1283],
  |        [      -257],
  |        [       108]]), x2=array([[14],
  |        [14],
  |        [14],
  |        [14]], dtype=int16), kw={'axes': ((), ())}) produces unreliable results: Falsified on the first call but did not on a subsequent one (1 sub-exception)
  | Falsifying example: test_linalg_tensordot(
  |     x1=array([[-100992768],
  |            [      1283],
  |            [      -257],
  |            [       108]]),
  |     x2=array([[14],
  |            [14],
  |            [14],
  |            [14]], dtype=int16),
  |     kw={'axes': ((), ())},
  | )
  | Unreliable test timings! On an initial run, this test took 1293.15ms, which exceeded the deadline of 800.00ms, but on a subsequent run it took 2.52 ms, which did not. If you expect this sort of variability in your test timings, consider turning deadlines off for this test by setting deadline=None.
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 1045, in _execute_once_for_engine
    |     result = self.execute_once(data)
    |              ^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 975, in execute_once
    |     result = self.test_runner(data, run)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 739, in default_executor
    |     return function(data)
    |            ^^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 950, in run
    |     return test(*args, **kwargs)
    |            ^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/Documents/array-api-tests/array_api_tests/test_linalg.py", line 844, in test_linalg_tensordot
    |     @pytest.mark.xp_extension('linalg')
    |                    ^^^^^^^^^^^^^
    |   File "/home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/hypothesis/core.py", line 873, in test
    |     raise DeadlineExceeded(
    | hypothesis.errors.DeadlineExceeded: Test took 1293.15ms, which exceeds the deadline of 800.00ms
    +------------------------------------
__________________________________________________________________________________________________ test_unstack ___________________________________________________________________________________________________

    @pytest.mark.min_version("2023.12")
>   @given(x=hh.arrays(dtype=hh.all_dtypes, shape=hh.shapes(min_dims=1)), data=st.data())

array_api_tests/test_manipulation_functions.py:445: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
array_api_tests/test_manipulation_functions.py:449: in test_unstack
    out = xp.unstack(x, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <undefined stub for 'unstack'>, args = (array([], dtype=bool),), kwargs = {}

    def _raise(self, *args, **kwargs):
>       raise AssertionError(f"{self.name} is not defined in {xp.__name__}")
E       AssertionError: unstack is not defined in array_api_compat.cupy
E       Falsifying example: test_unstack(
E           x=array([], dtype=bool),  # or any other generated value
E           data=data(...),
E       )
E       Draw 1 (axis): 0
E       Draw 2 (kw): {}

array_api_tests/_array_module.py:18: AssertionError
________________________________________________________________________________________________ test_searchsorted ________________________________________________________________________________________________

    @pytest.mark.min_version("2023.12")
>   @given(data=st.data())

array_api_tests/test_searching_functions.py:173: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
array_api_tests/test_searching_functions.py:201: in test_searchsorted
    expected=xp.__array_namespace_info__().default_dtypes()["indexing"],
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <undefined stub for '__array_namespace_info__'>, args = (), kwargs = {}

    def _raise(self, *args, **kwargs):
>       raise AssertionError(f"{self.name} is not defined in {xp.__name__}")
E       AssertionError: __array_namespace_info__ is not defined in array_api_compat.cupy
E       Falsifying example: test_searchsorted(
E           data=data(...),
E       )
E       Draw 1 (_x1): [0.0]
E       Draw 2 (use sorter?): False
E       x1=array([0.])
E       Draw 3 (x2): (lambda o: xp.asarray(o, dtype=dh.default_float))([0.0])

array_api_tests/_array_module.py:18: AssertionError
________________________________________________________________________________________ test_func_signature[from_dlpack] _________________________________________________________________________________________

stub = <function from_dlpack at 0x7f1e5a6e0d60>

    @pytest.mark.parametrize(
        "stub",
        [s for stubs in category_to_funcs.values() for s in stubs],
        ids=lambda f: f.__name__,
    )
    def test_func_signature(stub: FunctionType):
        assert hasattr(xp, stub.__name__), f"{stub.__name__} not found in array module"
        func = getattr(xp, stub.__name__)
>       _test_func_signature(func, stub)

array_api_tests/test_signatures.py:280: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
array_api_tests/test_signatures.py:267: in _test_func_signature
    raise e from None  # suppress parent exception for cleaner pytest output
array_api_tests/test_signatures.py:265: in _test_func_signature
    _test_uninspectable_func(stub.__name__, func, stub_sig)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

func_name = 'from_dlpack', func = <built-in function from_dlpack>, stub_sig = <Signature (x: object, /, *, device: Optional[~device] = None, copy: Optional[bool] = None) -> ~array>

    def _test_uninspectable_func(func_name: str, func: Callable, stub_sig: Signature):
        params = list(stub_sig.parameters.values())

        if len(params) == 0:
            func()
            return

        uninspectable_msg = (
            f"Note {func_name}() is not inspectable so arguments are passed "
            "manually to test the signature."
        )

        argname_to_arg = copy(func_to_specified_args[func_name])
        argname_to_expr = func_to_specified_arg_exprs[func_name]
        for argname, expr in argname_to_expr.items():
            assert argname not in argname_to_arg.keys()  # sanity check
            try:
                argname_to_arg[argname] = eval(expr, {"xp": xp})
            except Exception as e:
                pytest.skip(
                    f"Exception occured when evaluating {argname}={expr}: {e}\n"
                    f"{uninspectable_msg}"
                )

        posargs = []
        posorkw_args = {}
        kwargs = {}
        no_arg_msg = (
            "We have no argument specified for '{}'. Please ensure you're using "
            "the latest version of array-api-tests, then open an issue if one "
            f"doesn't already exist. {uninspectable_msg}"
        )
        for param in params:
            if param.kind == Parameter.POSITIONAL_ONLY:
                try:
                    posargs.append(argname_to_arg[param.name])
                except KeyError:
                    pytest.skip(no_arg_msg.format(param.name))
            elif param.kind == Parameter.POSITIONAL_OR_KEYWORD:
                if param.default == Parameter.empty:
                    try:
                        posorkw_args[param.name] = argname_to_arg[param.name]
                    except KeyError:
                        pytest.skip(no_arg_msg.format(param.name))
                else:
                    assert argname_to_arg[param.name]
                    posorkw_args[param.name] = param.default
            elif param.kind == Parameter.KEYWORD_ONLY:
                assert param.default != Parameter.empty  # sanity check
                kwargs[param.name] = param.default
            else:
                assert param.kind in VAR_KINDS  # sanity check
                pytest.skip(no_arg_msg.format(param.name))
        if len(posorkw_args) == 0:
>           func(*posargs, **kwargs)
E           TypeError: cupy._core.dlpack.from_dlpack() takes no keyword arguments

array_api_tests/test_signatures.py:240: TypeError
___________________________________________________________________________________________ test_func_signature[astype] ___________________________________________________________________________________________

stub = <function astype at 0x7f1e5a6e1580>

    @pytest.mark.parametrize(
        "stub",
        [s for stubs in category_to_funcs.values() for s in stubs],
        ids=lambda f: f.__name__,
    )
    def test_func_signature(stub: FunctionType):
        assert hasattr(xp, stub.__name__), f"{stub.__name__} not found in array module"
        func = getattr(xp, stub.__name__)
>       _test_func_signature(func, stub)

array_api_tests/test_signatures.py:280: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
array_api_tests/test_signatures.py:269: in _test_func_signature
    _test_inspectable_func(sig, stub_sig)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

sig = <Signature (x: 'ndarray', dtype: 'Dtype', /, *, copy: 'bool' = True) -> 'ndarray'>, stub_sig = <Signature (x: ~array, dtype: ~dtype, /, *, copy: bool = True, device: Optional[~device] = None) -> ~array>

    def _test_inspectable_func(sig: Signature, stub_sig: Signature):
        params = list(sig.parameters.values())
        stub_params = list(stub_sig.parameters.values())

        non_kwonly_stub_params = [
            p for p in stub_params if p.kind != Parameter.KEYWORD_ONLY
        ]
        # sanity check
        assert non_kwonly_stub_params == stub_params[: len(non_kwonly_stub_params)]
        # We're not interested if the array module has additional arguments, so we
        # only iterate through the arguments listed in the spec.
        for i, stub_param in enumerate(non_kwonly_stub_params):
            assert (
                len(params) >= i + 1
            ), f"Argument '{stub_param.name}' missing from signature"
            param = params[i]

            # We're not interested in the name if it isn't actually used
            if stub_param.kind not in [Parameter.POSITIONAL_ONLY, *VAR_KINDS]:
                assert (
                    param.name == stub_param.name
                ), f"Expected argument '{param.name}' to be named '{stub_param.name}'"

            if stub_param.kind in [Parameter.POSITIONAL_OR_KEYWORD, *VAR_KINDS]:
                f_stub_kind = kind_to_str[stub_param.kind]
                assert param.kind == stub_param.kind, (
                    f"{param.name} is a {kind_to_str[param.kind]}, "
                    f"but should be a {f_stub_kind}"
                )

        kwonly_stub_params = stub_params[len(non_kwonly_stub_params) :]
        for stub_param in kwonly_stub_params:
>           assert (
                stub_param.name in sig.parameters.keys()
            ), f"Argument '{stub_param.name}' missing from signature"
E           AssertionError: Argument 'device' missing from signature
E           assert 'device' in odict_keys(['x', 'dtype', 'copy'])
E            +  where 'device' = <Parameter "device: Optional[~device] = None">.name
E            +  and   odict_keys(['x', 'dtype', 'copy']) = <built-in method keys of mappingproxy object at 0x7f1e58b464a0>()
E            +    where <built-in method keys of mappingproxy object at 0x7f1e58b464a0> = mappingproxy(OrderedDict({'x': <Parameter "x: 'ndarray'">, 'dtype': <Parameter "dtype: 'Dtype'">, 'copy': <Parameter "copy: 'bool' = True">})).keys
E            +      where mappingproxy(OrderedDict({'x': <Parameter "x: 'ndarray'">, 'dtype': <Parameter "dtype: 'Dtype'">, 'copy': <Parameter "copy: 'bool' = True">})) = <Signature (x: 'ndarray', dtype: 'Dtype', /, *, copy: 'bool' = True) -> 'ndarray'>.parameters

array_api_tests/test_signatures.py:87: AssertionError
_______________________________________________________________________________________ test_func_signature[cumulative_sum] _______________________________________________________________________________________

stub = <function cumulative_sum at 0x7f1e5a6f5d00>

    @pytest.mark.parametrize(
        "stub",
        [s for stubs in category_to_funcs.values() for s in stubs],
        ids=lambda f: f.__name__,
    )
    def test_func_signature(stub: FunctionType):
>       assert hasattr(xp, stub.__name__), f"{stub.__name__} not found in array module"
E       AssertionError: cumulative_sum not found in array module
E       assert False
E        +  where False = hasattr(xp, 'cumulative_sum')
E        +    where 'cumulative_sum' = <function cumulative_sum at 0x7f1e5a6f5d00>.__name__

array_api_tests/test_signatures.py:278: AssertionError
__________________________________________________________________________________________ test_func_signature[unstack] ___________________________________________________________________________________________

stub = <function unstack at 0x7f1e5a6f5300>

    @pytest.mark.parametrize(
        "stub",
        [s for stubs in category_to_funcs.values() for s in stubs],
        ids=lambda f: f.__name__,
    )
    def test_func_signature(stub: FunctionType):
>       assert hasattr(xp, stub.__name__), f"{stub.__name__} not found in array module"
E       AssertionError: unstack not found in array module
E       assert False
E        +  where False = hasattr(xp, 'unstack')
E        +    where 'unstack' = <function unstack at 0x7f1e5a6f5300>.__name__

array_api_tests/test_signatures.py:278: AssertionError
__________________________________________________________________________________ test_func_signature[__array_namespace_info__] __________________________________________________________________________________

stub = <function __array_namespace_info__ at 0x7f1e5a6f7c40>

    @pytest.mark.parametrize(
        "stub",
        [s for stubs in category_to_funcs.values() for s in stubs],
        ids=lambda f: f.__name__,
    )
    def test_func_signature(stub: FunctionType):
>       assert hasattr(xp, stub.__name__), f"{stub.__name__} not found in array module"
E       AssertionError: __array_namespace_info__ not found in array module
E       assert False
E        +  where False = hasattr(xp, '__array_namespace_info__')
E        +    where '__array_namespace_info__' = <function __array_namespace_info__ at 0x7f1e5a6f7c40>.__name__

array_api_tests/test_signatures.py:278: AssertionError
_____________________________________________________________________________________ test_array_method_signature[__dlpack__] _____________________________________________________________________________________

stub = <function _array.__dlpack__ at 0x7f1e5a6cb7e0>

    @pytest.mark.parametrize("stub", array_methods, ids=lambda f: f.__name__)
    def test_array_method_signature(stub: FunctionType):
        x_expr = func_to_specified_arg_exprs[stub.__name__]["self"]
        try:
            x = eval(x_expr, {"xp": xp})
        except Exception as e:
            pytest.skip(f"Exception occured when evaluating x={x_expr}: {e}")
        assert hasattr(x, stub.__name__), f"{stub.__name__} not found in array object {x!r}"
        method = getattr(x, stub.__name__)
>       _test_func_signature(method, stub, is_method=True)

array_api_tests/test_signatures.py:311: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
array_api_tests/test_signatures.py:267: in _test_func_signature
    raise e from None  # suppress parent exception for cleaner pytest output
array_api_tests/test_signatures.py:265: in _test_func_signature
    _test_uninspectable_func(stub.__name__, func, stub_sig)
array_api_tests/test_signatures.py:240: in _test_uninspectable_func
    func(*posargs, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: __dlpack__() got an unexpected keyword argument 'max_version'

cupy/_core/core.pyx:281: TypeError
_____________________________________________________________________________________ test_info_func_signature[capabilities] ______________________________________________________________________________________

stub = <function capabilities at 0x7f1e5a6f7ce0>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
>           info_namespace = xp.__array_namespace_info__()
E           AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:318: AttributeError

During handling of the above exception, another exception occurred:

stub = <function capabilities at 0x7f1e5a6f7ce0>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
            info_namespace = xp.__array_namespace_info__()
        except Exception as e:
>           raise AssertionError(f"Could not get info namespace from xp.__array_namespace_info__(): {e}")
E           AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:320: AssertionError
____________________________________________________________________________________ test_info_func_signature[default_device] _____________________________________________________________________________________

stub = <function default_device at 0x7f1e5a6f7d80>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
>           info_namespace = xp.__array_namespace_info__()
E           AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:318: AttributeError

During handling of the above exception, another exception occurred:

stub = <function default_device at 0x7f1e5a6f7d80>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
            info_namespace = xp.__array_namespace_info__()
        except Exception as e:
>           raise AssertionError(f"Could not get info namespace from xp.__array_namespace_info__(): {e}")
E           AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:320: AssertionError
____________________________________________________________________________________ test_info_func_signature[default_dtypes] _____________________________________________________________________________________

stub = <function default_dtypes at 0x7f1e5a6f7e20>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
>           info_namespace = xp.__array_namespace_info__()
E           AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:318: AttributeError

During handling of the above exception, another exception occurred:

stub = <function default_dtypes at 0x7f1e5a6f7e20>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
            info_namespace = xp.__array_namespace_info__()
        except Exception as e:
>           raise AssertionError(f"Could not get info namespace from xp.__array_namespace_info__(): {e}")
E           AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:320: AssertionError
________________________________________________________________________________________ test_info_func_signature[devices] ________________________________________________________________________________________

stub = <function devices at 0x7f1e5a6f7f60>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
>           info_namespace = xp.__array_namespace_info__()
E           AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:318: AttributeError

During handling of the above exception, another exception occurred:

stub = <function devices at 0x7f1e5a6f7f60>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
            info_namespace = xp.__array_namespace_info__()
        except Exception as e:
>           raise AssertionError(f"Could not get info namespace from xp.__array_namespace_info__(): {e}")
E           AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:320: AssertionError
________________________________________________________________________________________ test_info_func_signature[dtypes] _________________________________________________________________________________________

stub = <function dtypes at 0x7f1e5a6f7ec0>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
>           info_namespace = xp.__array_namespace_info__()
E           AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:318: AttributeError

During handling of the above exception, another exception occurred:

stub = <function dtypes at 0x7f1e5a6f7ec0>

    @pytest.mark.min_version("2023.12")
    @pytest.mark.parametrize("stub", info_funcs, ids=lambda f: f.__name__)
    def test_info_func_signature(stub: FunctionType):
        try:
            info_namespace = xp.__array_namespace_info__()
        except Exception as e:
>           raise AssertionError(f"Could not get info namespace from xp.__array_namespace_info__(): {e}")
E           AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'

array_api_tests/test_signatures.py:320: AssertionError
_____________________________________________________________________________________ test_unary[signbit(x_i is -0) -> True] ______________________________________________________________________________________

func_name = 'signbit', func = <ufunc 'cupy_signbit'>, case = UnaryCase(<x_i is -0 -> True>)

    @pytest.mark.parametrize("func_name, func, case", unary_params)
    def test_unary(func_name, func, case):
        in_value = case.cond_from_dtype(xp.float64).example()
        x = xp.asarray(in_value, dtype=xp.float64)
        out = func(x)
        out_value = float(out)
>       assert case.check_result(in_value, out_value), (
            f"out={out_value}, but should be {case.result_expr} [{func_name}()]\n"
        )
E       AssertionError: out=0.0, but should be True [signbit()]
E         
E       assert False
E        +  where False = <function make_unary_check_result.<locals>.check_result at 0x7f1e59fdcf40>(-0.0, 0.0)
E        +    where <function make_unary_check_result.<locals>.check_result at 0x7f1e59fdcf40> = UnaryCase(<x_i is -0 -> True>).check_result

array_api_tests/test_special_cases.py:1257: AssertionError
_______________________________________________________________________________________________ test_cumulative_sum _______________________________________________________________________________________________

    @pytest.mark.min_version("2023.12")
>   @given(
        x=hh.arrays(
            dtype=hh.numeric_dtypes,
            shape=hh.shapes(min_dims=1)),
        data=st.data(),
    )

array_api_tests/test_statistical_functions.py:20: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
array_api_tests/test_statistical_functions.py:44: in test_cumulative_sum
    out = xp.cumulative_sum(x, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <undefined stub for 'cumulative_sum'>, args = (array([], dtype=uint8),), kwargs = {'axis': 0}

    def _raise(self, *args, **kwargs):
>       raise AssertionError(f"{self.name} is not defined in {xp.__name__}")
E       AssertionError: cumulative_sum is not defined in array_api_compat.cupy
E       Falsifying example: test_cumulative_sum(
E           x=array([], dtype=uint8),  # or any other generated value
E           data=data(...),
E       )
E       Draw 1 (axis): 0
E       Draw 2: None
E       Draw 3 (include_initial): False
E       Draw 4 (kw): {'axis': 0}

array_api_tests/_array_module.py:18: AssertionError
____________________________________________________________________________________________________ test_sum _____________________________________________________________________________________________________

    @pytest.mark.unvectorized
>   @given(
        x=hh.arrays(
            dtype=hh.numeric_dtypes,
            shape=hh.shapes(min_side=1),
            elements={"allow_nan": False},
        ),
        data=st.data(),
    )

array_api_tests/test_statistical_functions.py:269: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

x = array(0.+0.j, dtype=complex64), data = data(...)

    @pytest.mark.unvectorized
    @given(
        x=hh.arrays(
            dtype=hh.numeric_dtypes,
            shape=hh.shapes(min_side=1),
            elements={"allow_nan": False},
        ),
        data=st.data(),
    )
    def test_sum(x, data):
        kw = data.draw(
            hh.kwargs(
                axis=hh.axes(x.ndim),
                dtype=kwarg_dtypes(x.dtype),
                keepdims=st.booleans(),
            ),
            label="kw",
        )
        keepdims = kw.get("keepdims", False)

        with hh.reject_overflow():
            out = xp.sum(x, **kw)

        dtype = kw.get("dtype", None)
        expected_dtype = dh.accumulation_result_dtype(x.dtype, dtype)
        if expected_dtype is None:
            # If a default uint cannot exist (i.e. in PyTorch which doesn't support
            # uint32 or uint64), we skip testing the output dtype.
            # See https://github.com/data-apis/array-api-tests/issues/160
            if x.dtype in dh.uint_dtypes:
                assert dh.is_int_dtype(out.dtype)  # sanity check
        else:
>           ph.assert_dtype("sum", in_dtype=x.dtype, out_dtype=out.dtype, expected=expected_dtype)
E           AssertionError: out.dtype=complex128, but should be complex64 [sum(complex64)]
E           Falsifying example: test_sum(
E               x=array(0.+0.j, dtype=complex64),
E               data=data(...),
E           )
E           Draw 1 (kw): {}
E           Explanation:
E               These lines were always and only run by failing examples:
E                   /home/aaronmeurer/Documents/array-api-compat/array_api_compat/common/_aliases.py:408
E                   /home/aaronmeurer/Documents/array-api-tests/array_api_tests/dtype_helpers.py:284
E                   /home/aaronmeurer/Documents/array-api-tests/array_api_tests/hypothesis_helpers.py:39
E                   /home/aaronmeurer/Documents/array-api-tests/array_api_tests/hypothesis_helpers.py:46
E                   /home/aaronmeurer/Documents/array-api-tests/array_api_tests/hypothesis_helpers.py:60
E                   /home/aaronmeurer/miniconda3/envs/array-apis/lib/python3.12/site-packages/numpy/core/getlimits.py:485

array_api_tests/test_statistical_functions.py:300: AssertionError
============================================================================================= short test summary info =============================================================================================
FAILED array_api_tests/test_has_names.py::test_has_names[statistical-cumulative_sum] - AssertionError: array_api_compat.cupy is missing the statistical function cumulative_sum()
FAILED array_api_tests/test_has_names.py::test_has_names[manipulation-unstack] - AssertionError: array_api_compat.cupy is missing the manipulation function unstack()
FAILED array_api_tests/test_has_names.py::test_has_names[info-__array_namespace_info__] - AssertionError: array_api_compat.cupy is missing the info function __array_namespace_info__()
FAILED array_api_tests/test_inspection_functions.py::test_array_namespace_info - AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'
FAILED array_api_tests/test_inspection_functions.py::test_array_namespace_info_dtypes - AttributeError: module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'
FAILED array_api_tests/test_linalg.py::test_linalg_matmul - hypothesis.errors.FlakyFailure: Hypothesis test_linalg_matmul(x1=array([[31]], dtype=uint16), x2=array([[[[[-8658]]]]], dtype=int32)) produces unreliable results: Falsified on the first call but did not on ...
FAILED array_api_tests/test_linalg.py::test_linalg_tensordot - hypothesis.errors.FlakyFailure: Hypothesis test_linalg_tensordot(x1=array([[-100992768],
FAILED array_api_tests/test_manipulation_functions.py::test_unstack - AssertionError: unstack is not defined in array_api_compat.cupy
FAILED array_api_tests/test_searching_functions.py::test_searchsorted - AssertionError: __array_namespace_info__ is not defined in array_api_compat.cupy
FAILED array_api_tests/test_signatures.py::test_func_signature[from_dlpack] - TypeError: cupy._core.dlpack.from_dlpack() takes no keyword arguments
FAILED array_api_tests/test_signatures.py::test_func_signature[astype] - AssertionError: Argument 'device' missing from signature
FAILED array_api_tests/test_signatures.py::test_func_signature[cumulative_sum] - AssertionError: cumulative_sum not found in array module
FAILED array_api_tests/test_signatures.py::test_func_signature[unstack] - AssertionError: unstack not found in array module
FAILED array_api_tests/test_signatures.py::test_func_signature[__array_namespace_info__] - AssertionError: __array_namespace_info__ not found in array module
FAILED array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__] - TypeError: __dlpack__() got an unexpected keyword argument 'max_version'
FAILED array_api_tests/test_signatures.py::test_info_func_signature[capabilities] - AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'
FAILED array_api_tests/test_signatures.py::test_info_func_signature[default_device] - AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'
FAILED array_api_tests/test_signatures.py::test_info_func_signature[default_dtypes] - AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'
FAILED array_api_tests/test_signatures.py::test_info_func_signature[devices] - AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'
FAILED array_api_tests/test_signatures.py::test_info_func_signature[dtypes] - AssertionError: Could not get info namespace from xp.__array_namespace_info__(): module 'array_api_compat.cupy' has no attribute '__array_namespace_info__'
FAILED array_api_tests/test_special_cases.py::test_unary[signbit(x_i is -0) -> True] - AssertionError: out=0.0, but should be True [signbit()]
FAILED array_api_tests/test_statistical_functions.py::test_cumulative_sum - AssertionError: cumulative_sum is not defined in array_api_compat.cupy
FAILED array_api_tests/test_statistical_functions.py::test_sum - AssertionError: out.dtype=complex128, but should be complex64 [sum(complex64)]
=========================================================== 23 failed, 892 passed, 10 skipped, 54 xfailed, 35 xpassed, 513 warnings in 66.85s (0:01:06) ===========================================================