MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / _not_requiring_metadata

Function _not_requiring_metadata

monai/data/meta_tensor.py:46–49  ·  view source on GitHub ↗
(ret)

Source from the content-addressed store, hash-verified

44
45
46def _not_requiring_metadata(ret):
47 return isinstance(ret, (int, str, bytes, torch.Size, torch.dtype, torch.device, np.ndarray)) or not (
48 isinstance(ret, MetaTensor) or (isinstance(ret, Sequence) and any(isinstance(x, MetaTensor) for x in ret))
49 )
50
51
52class MetaTensor(MetaObj, torch.Tensor):

Callers 1

__torch_function__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…