Returns a numpy array of ``self``. The array and ``self`` shares the same underlying storage if self is on cpu. Changes to ``self`` (it's a subclass of torch.Tensor) will be reflected in the ndarray and vice versa. If ``self`` is not on cpu, the call will move the array to c
(self)
| 393 | |
| 394 | @property |
| 395 | def array(self): |
| 396 | """ |
| 397 | Returns a numpy array of ``self``. The array and ``self`` shares the same underlying storage if self is on cpu. |
| 398 | Changes to ``self`` (it's a subclass of torch.Tensor) will be reflected in the ndarray and vice versa. |
| 399 | If ``self`` is not on cpu, the call will move the array to cpu and then the storage is not shared. |
| 400 | |
| 401 | :getter: see also: :py:func:`MetaTensor.get_array()` |
| 402 | :setter: see also: :py:func:`MetaTensor.set_array()` |
| 403 | """ |
| 404 | return self.get_array() |
| 405 | |
| 406 | @array.setter |
| 407 | def array(self, src) -> None: |