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

Method __repr__

monai/data/meta_tensor.py:583–589  ·  view source on GitHub ↗

Prints a representation of the tensor. Prepends "meta" to ``torch.Tensor.__repr__``. Use ``print_verbose`` for associated metadata.

(self)

Source from the content-addressed store, hash-verified

581 return img
582
583 def __repr__(self): # type: ignore[override]
584 """
585 Prints a representation of the tensor.
586 Prepends "meta" to ``torch.Tensor.__repr__``.
587 Use ``print_verbose`` for associated metadata.
588 """
589 return f"meta{self.as_tensor().__repr__()}"
590
591 def __str__(self):
592 """

Callers 2

test_strMethod · 0.95
print_verboseMethod · 0.45

Calls 1

as_tensorMethod · 0.95

Tested by 1

test_strMethod · 0.76