mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-04-09 05:55:58 +08:00
camera iteration #1408
Summary: Use IndexError so that a camera object is an iterable Reviewed By: shapovalov Differential Revision: D42312021 fbshipit-source-id: 67c417d5f1398e8b30a6944468eda057b4ceb444
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b7e3b7b16c
commit
84851c8312
@@ -432,7 +432,7 @@ class CamerasBase(TensorProperties):
|
||||
f"Boolean index of shape {index.shape} does not match cameras"
|
||||
)
|
||||
elif max(index) >= len(self):
|
||||
raise ValueError(f"Index {max(index)} is out of bounds for select cameras")
|
||||
raise IndexError(f"Index {max(index)} is out of bounds for select cameras")
|
||||
|
||||
for field in self._FIELDS:
|
||||
val = getattr(self, field, None)
|
||||
|
||||
Reference in New Issue
Block a user