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:
Jeremy Reizenstein
2023-01-16 08:52:52 -08:00
committed by Facebook GitHub Bot
parent b7e3b7b16c
commit 84851c8312
2 changed files with 7 additions and 2 deletions

View File

@@ -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)