π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
remove inplace operation (#2346)
Johan Edstedt70e6c332d6f3
diff --git a/kornia/geometry/conversions.py b/kornia/geometry/conversions.pyindex 85a13db65..a315fd2c2 100644--- a/kornia/geometry/conversions.py+++ b/kornia/geometry/conversions.py@@ -337,10 +337,8 @@ def angle_axis_to_rotation_matrix(angle_axis: Tensor) -> Tensor:mask_pos = (mask).type_as(theta2)mask_neg = (~mask).type_as(theta2)- # create output pose matrix- rotation_matrix = eye_like(3, angle_axis, shared_memory=False)- # fill output matrix with masked values- rotation_matrix[..., :3, :3] = mask_pos * rotation_matrix_normal + mask_neg * rotation_matrix_taylor+ # create output pose matrix with masked values+ rotation_matrix = mask_pos * rotation_matrix_normal + mask_neg * rotation_matrix_taylorreturn rotation_matrix # Nx3x3