@@ -205,9 +205,9 @@ def _init_get_camera_type(
205205 elif isinstance (camera_type , int ):
206206 camera_type = torch .tensor ([camera_type ], device = self .device )
207207 elif isinstance (camera_type , torch .Tensor ):
208- assert not torch .is_floating_point (
209- camera_type
210- ), f"camera_type tensor must be of type int, not: { camera_type . dtype } "
208+ assert not torch .is_floating_point (camera_type ), (
209+ f" camera_type tensor must be of type int, not: { camera_type . dtype } "
210+ )
211211 camera_type = camera_type .to (self .device )
212212 if camera_type .ndim == 0 or camera_type .shape [- 1 ] != 1 :
213213 camera_type = camera_type .unsqueeze (- 1 )
@@ -400,14 +400,14 @@ def generate_rays(
400400
401401 # If the camera indices are an int, then we need to make sure that the camera batch is 1D
402402 if isinstance (camera_indices , int ):
403- assert (
404- len ( cameras . shape ) == 1
405- ), "camera_indices must be a tensor if cameras are batched with more than 1 batch dimension"
403+ assert len ( cameras . shape ) == 1 , (
404+ "camera_indices must be a tensor if cameras are batched with more than 1 batch dimension"
405+ )
406406 camera_indices = torch .tensor ([camera_indices ], device = cameras .device )
407407
408- assert camera_indices .shape [- 1 ] == len (
409- cameras . shape
410- ), "camera_indices must have shape (num_rays:..., num_cameras_batch_dims)"
408+ assert camera_indices .shape [- 1 ] == len (cameras . shape ), (
409+ "camera_indices must have shape (num_rays:..., num_cameras_batch_dims)"
410+ )
411411
412412 # If keep_shape is True, then we need to make sure that the camera indices in question
413413 # are all the same height and width and can actually be batched while maintaining the image
0 commit comments