diff --git a/pytorch3d/structures/meshes.py b/pytorch3d/structures/meshes.py index a3ceb08f..55addd61 100644 --- a/pytorch3d/structures/meshes.py +++ b/pytorch3d/structures/meshes.py @@ -493,7 +493,7 @@ class Meshes: # NOTE consider converting index to cpu for efficiency if index.dtype == torch.bool: # advanced indexing on a single dimension - index = index.nonzero() # pyre-ignore + index = index.nonzero() index = index.squeeze(1) if index.numel() > 0 else index index = index.tolist() verts = [self.verts_list()[i] for i in index] diff --git a/pytorch3d/structures/pointclouds.py b/pytorch3d/structures/pointclouds.py index d23e74f8..9b65f496 100644 --- a/pytorch3d/structures/pointclouds.py +++ b/pytorch3d/structures/pointclouds.py @@ -351,7 +351,7 @@ class Pointclouds: # NOTE consider converting index to cpu for efficiency if index.dtype == torch.bool: # advanced indexing on a single dimension - index = index.nonzero() # pyre-ignore + index = index.nonzero() index = index.squeeze(1) if index.numel() > 0 else index index = index.tolist() points = [self.points_list()[i] for i in index]