示例#1
0
    def test_to_axis_angle(self):
        # expected identity: [0,0,1] and 0
        ident_axis = [0, 0, 1]
        ident_angle = 0

        rot_d = Rotation('d')
        rot_f = Rotation('f')

        numpy.testing.assert_equal(rot_d.axis(), ident_axis)
        nose.tools.assert_equal(rot_d.angle(), ident_angle)

        numpy.testing.assert_equal(rot_f.axis(), ident_axis)
        nose.tools.assert_equal(rot_f.angle(), ident_angle)
示例#2
0
    def test_to_axis_angle(self):
        # expected identity: [0,0,1] and 0
        ident_axis = [0, 0, 1]
        ident_angle = 0

        rot_d = Rotation('d')
        rot_f = Rotation('f')

        numpy.testing.assert_equal(rot_d.axis(), ident_axis)
        nose.tools.assert_equal(rot_d.angle(), ident_angle)

        numpy.testing.assert_equal(rot_f.axis(), ident_axis)
        nose.tools.assert_equal(rot_f.angle(), ident_angle)
示例#3
0
    def test_to_axis_angle(self):
        # expected identity: [0,0,1] and 0
        ident_axis = [[0], [0], [1]]
        ident_angle = 0

        rot_d = Rotation(ctypes.c_double)
        rot_f = Rotation(ctypes.c_float)

        numpy.testing.assert_equal(rot_d.axis(), ident_axis)
        nose.tools.assert_equal(rot_d.angle(), ident_angle)

        numpy.testing.assert_equal(rot_f.axis(), ident_axis)
        nose.tools.assert_equal(rot_f.angle(), ident_angle)
示例#4
0
    def test_to_axis_angle(self):
        # expected identity: [0,0,1] and 0
        ident_axis = [[0],
                      [0],
                      [1]]
        ident_angle = 0

        rot_d = Rotation(ctypes.c_double)
        rot_f = Rotation(ctypes.c_float)

        numpy.testing.assert_equal(rot_d.axis(), ident_axis)
        nose.tools.assert_equal(rot_d.angle(), ident_angle)

        numpy.testing.assert_equal(rot_f.axis(), ident_axis)
        nose.tools.assert_equal(rot_f.angle(), ident_angle)