MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / is_same_transform

Function is_same_transform

utils/utils_poses/ATE/transformations.py:1934–1947  ·  view source on GitHub ↗

Return True if two matrices perform same transformation. >>> is_same_transform(numpy.identity(4), numpy.identity(4)) True >>> is_same_transform(numpy.identity(4), random_rotation_matrix()) False

(matrix0, matrix1)

Source from the content-addressed store, hash-verified

1932
1933
1934def is_same_transform(matrix0, matrix1):
1935 """Return True if two matrices perform same transformation.
1936
1937 >>> is_same_transform(numpy.identity(4), numpy.identity(4))
1938 True
1939 >>> is_same_transform(numpy.identity(4), random_rotation_matrix())
1940 False
1941
1942 """
1943 matrix0 = numpy.array(matrix0, dtype=numpy.float64, copy=True)
1944 matrix0 /= matrix0[3, 3]
1945 matrix1 = numpy.array(matrix1, dtype=numpy.float64, copy=True)
1946 matrix1 /= matrix1[3, 3]
1947 return numpy.allclose(matrix0, matrix1)
1948
1949
1950def _import_module(module_name, warn=True, prefix='_py_', ignore='_'):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected