We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d90607b commit 218201eCopy full SHA for 218201e
tests/test_pose3d.py
@@ -888,6 +888,21 @@ def test_properties(self):
888
nt.assert_equal(R.N, 3)
889
nt.assert_equal(R.shape, (4, 4))
890
891
+ # Testing the CopyFrom function
892
+ mutable_array = np.eye(4)
893
+ pass_by_ref = SE3(mutable_array)
894
+ pass_by_val = SE3.CopyFrom(mutable_array)
895
+ mutable_array[0, 3] = 5.0
896
+ nt.assert_allclose(pass_by_val.data[0], np.eye(4))
897
+ nt.assert_allclose(pass_by_ref.data[0], mutable_array)
898
+ nt.assert_raises(
899
+ AssertionError,
900
+ nt.assert_allclose,
901
+ pass_by_val.data[0],
902
+ pass_by_ref.data[0]
903
+ )
904
+
905
906
def test_arith(self):
907
T = SE3(1, 2, 3)
908
0 commit comments