From 52a7f6c8e3fbc3fa7ee15d9f1dd8e6392aa1d0b5 Mon Sep 17 00:00:00 2001 From: Alexander Fabisch Date: Mon, 7 Aug 2023 09:19:43 +0200 Subject: [PATCH] Use float type limits --- pytransform3d/batch_rotations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytransform3d/batch_rotations.py b/pytransform3d/batch_rotations.py index 1b1d6d3f6..5e35cc5d0 100644 --- a/pytransform3d/batch_rotations.py +++ b/pytransform3d/batch_rotations.py @@ -302,7 +302,7 @@ def axis_angles_from_matrices(Rs, traces=None, out=None): # out[False, n] = value will not assign value to out[n] traces = traces[0] - angles = np.arccos(np.clip((traces - 1.0) / 2.0, -1, 1)) + angles = np.arccos(np.clip((traces - 1.0) / 2.0, -1.0, 1.0)) if out is None: out = np.empty(instances_shape + (4,))