Skip to content

Commit

Permalink
Fix issue with matrix4x4 returning different type (float64) than the …
Browse files Browse the repository at this point in the history
…R, t in the transformation (float32).

PiperOrigin-RevId: 697961266
  • Loading branch information
The visu3d Authors committed Nov 19, 2024
1 parent 26cc55d commit 96c6989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visu3d/dc_arrays/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def matrix4x4(self) -> FloatArray['*shape 4 4']:
t = einops.rearrange(self.t, '... d -> ... d 1')
matrix3x4 = self.xnp.concatenate([self.R, t], axis=-1)
assert matrix3x4.shape == (3, 4)
last_row = self.xnp.asarray([[0, 0, 0, 1]])
last_row = self.xnp.asarray([[0, 0, 0, 1]], dtype=self.R.dtype)
return self.xnp.concatenate([matrix3x4, last_row], axis=-2)

@property
Expand Down

0 comments on commit 96c6989

Please sign in to comment.