{ } Raw JSON

bundles / scipy 1.17.1 / scipy / _lib / array_api_compat / common / _helpers / is_torch_namespace

_lru_cache_wrapper

scipy._lib.array_api_compat.common._helpers:is_torch_namespace

source: /scipy/_lib/array_api_compat/common/_helpers.py :362

Signature

def   is_torch_namespace ( xp : Namespace )  →  bool

Summary

Returns True if xp is a PyTorch namespace.

Extended Summary

This includes both PyTorch itself and the version wrapped by array-api-compat.

See also

array_namespace
is_array_api_strict_namespace
is_cupy_namespace
is_dask_namespace
is_jax_namespace
is_ndonnx_namespace
is_numpy_namespace
is_pydata_sparse_namespace

Aliases

  • scipy.signal._signaltools.is_torch