bundles / scipy 1.17.1 / scipy / _lib / array_api_compat / common / _helpers / is_torch_array
function
scipy._lib.array_api_compat.common._helpers:is_torch_array
Signature
def is_torch_array(x: object) → TypeIs[torch.Tensor]Summary
Return True if x is a PyTorch tensor.
Extended Summary
This function does not import PyTorch if it has not already been imported and is therefore cheap to use.
See also
Aliases
scipy.differentiate.xpx._lib._at.is_torch_array