latest (dev)
Copy
Latest development documentation · Updated 2026-10-08
tensorplay.masked.is_masked_tensor
- tensorplay.masked.is_masked_tensor(obj: Any, /) bool[source]
Return True if the input is a MaskedTensor, else False.
- Parameters:
obj – any input
Examples
>>> # xdoctest: +SKIP >>> from tensorplay.masked import MaskedTensor >>> data = tensorplay.arange(6).reshape(2, 3) >>> mask = tp.tensor([[True, False, False], [True, True, False]]) >>> mt = MaskedTensor(data, mask) >>> is_masked_tensor(mt) True
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

