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)
| 1932 | |
| 1933 | |
| 1934 | def 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 | |
| 1950 | def _import_module(module_name, warn=True, prefix='_py_', ignore='_'): |
nothing calls this directly
no outgoing calls
no test coverage detected