Commit 52f2f6f
Project-MONAI#6213 Prepend
Discussed in Project-MONAI#6213
### Description
Prepends `"meta"` to the `MetaTensor.__repr__` and `MetaTensor.__str__`
output so printing a MetaTensor does not look the exact same as a
regular `torch.Tensor`.
I don't expect this change to cause any breaks, with me running the risk
of invoking [xkcd 1172](https://xkcd.com/1172/).
---
1 failure in `./runtests.sh -f -u --net --coverage`:
```text
======================================================================
FAIL: test_values (tests.test_tciadataset.TestTciaDataset)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\PythonProjects\MONAI-SaveImageFormatting\tests\test_tciadataset.py", line 72, in test_values
self.assertTrue(
AssertionError: False is not true
```
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [x] New tests added to cover the changes.
- [x] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
---------
Signed-off-by: Mathijs de Boer <m.deboer-41@umcutrecht.nl>"meta" to MetaTensor.__repr__ and MetaTensor.__str__ for easier identification (Project-MONAI#6214)1 parent 5a66787 commit 52f2f6f
2 files changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
| 573 | + | |
573 | 574 | | |
574 | 575 | | |
575 | | - | |
| 576 | + | |
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
579 | | - | |
| 580 | + | |
| 581 | + | |
580 | 582 | | |
581 | 583 | | |
582 | | - | |
| 584 | + | |
583 | 585 | | |
584 | 586 | | |
585 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
| 433 | + | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| |||
0 commit comments