Convert current points to a specific device. Args: device (str or :obj:`torch.device`): The name of the device. Returns: :obj:`BasePoints`: A new points object on the specific device.
(self, device: Union[str, torch.device], *args,
**kwargs)
| 427 | return self.tensor.numpy() |
| 428 | |
| 429 | def to(self, device: Union[str, torch.device], *args, |
| 430 | **kwargs) -> 'BasePoints': |
| 431 | """Convert current points to a specific device. |
| 432 | |
| 433 | Args: |
| 434 | device (str or :obj:`torch.device`): The name of the device. |
| 435 | |
| 436 | Returns: |
| 437 | :obj:`BasePoints`: A new points object on the specific device. |
| 438 | """ |
| 439 | original_type = type(self) |
| 440 | return original_type(self.tensor.to(device, *args, **kwargs), |
| 441 | points_dim=self.points_dim, |
| 442 | attribute_dims=self.attribute_dims) |
| 443 | |
| 444 | def cpu(self) -> 'BasePoints': |
| 445 | """Convert current points to cpu device. |
no outgoing calls
no test coverage detected