(self, dim: int, index: torch.Tensor)
| 1612 | self.attr_names = ['H_c2w', 'intrinsic', 'width_px', 'height_px'] |
| 1613 | |
| 1614 | def index_select(self, dim: int, index: torch.Tensor) -> 'Camera': |
| 1615 | camera = self.clone() |
| 1616 | for attr_name in ['H_c2w', 'intrinsic']: |
| 1617 | arr = getattr(camera, attr_name, None) |
| 1618 | if arr is not None: |
| 1619 | setattr(camera, attr_name, torch.index_select(arr, dim=dim, index=index)) |
| 1620 | return camera |
| 1621 | |
| 1622 | def chunk(self, chunks: int, dim: int = 0) -> T.List['Camera']: |
| 1623 | out_dict = dict() |
no test coverage detected