Generate a single random 3x3 rotation matrix. Args: dtype: Type to return device: Device of returned tensor. Default: if None, uses the current device for the default tensor type Returns: Rotation matrix as tensor of shape (3, 3).
(
dtype: Optional[torch.dtype] = None, device: Optional[int] = None
)
| 357 | |
| 358 | |
| 359 | def random_rotation( |
| 360 | dtype: Optional[torch.dtype] = None, device: Optional[int] = None |
| 361 | ) -> torch.Tensor: |
| 362 | """ |
| 363 | Generate a single random 3x3 rotation matrix. |
| 364 | |
| 365 | Args: |
| 366 | dtype: Type to return |
| 367 | device: Device of returned tensor. Default: if None, |
| 368 | uses the current device for the default tensor type |
| 369 | |
| 370 | Returns: |
| 371 | Rotation matrix as tensor of shape (3, 3). |
| 372 | """ |
| 373 | return random_rotations(1, dtype, device)[0] |
| 374 | |
| 375 | |
| 376 |
nothing calls this directly
no test coverage detected