{ } Raw JSON

bundles / scipy 1.18.0 / scipy / _lib / _array_api / xp_capabilities

function

scipy._lib._array_api:xp_capabilities

source: /scipy/_lib/_array_api.py:843

Signature

def xp_capabilities(*, capabilities_table = None, skip_backends = (), xfail_backends = (), cpu_only = False, np_only = False, reason = None, out_of_scope = False, exceptions = (), warnings = (), allow_dask_compute = False, jax_jit = True, extra_note = None, method_capabilities = None, marray = False)

Summary

Decorator for a function that states its support among various Array API compatible backends.

Extended Summary

This decorator has two effects: 1. It allows tagging tests with @make_xp_test_case or make_xp_pytest_param (see below) to automatically generate SKIP/XFAIL markers and perform additional backend-specific testing, such as extra validation for Dask and JAX; 2. It automatically adds a note to the function's docstring, containing a table matching what has been tested.

See also

array_api_extra.testing.lazy_xp_function
make_xp_pytest_param
make_xp_test_case

Aliases

  • scipy.differentiate.xp_capabilities