示例#1
0
    def test_covariance(self):
        for ct in self.C_TYPES:
            print(ct)
            l = Landmark(c_type=ct)

            # check default
            nose.tools.assert_equal(l.covariance, Covariance(3))

            # set type-aligned covariance
            c = Covariance(3, ct, 7)
            l.covariance = c
            nose.tools.assert_equal(l.covariance, c)

            # set no-necessarily-aligned covariance
            c = Covariance(3, init_scalar_or_matrix=7)
            l.covariance = c
            nose.tools.assert_equal(l.covariance, c)
示例#2
0
    def test_covariance(self):
        for ct in self.ctypeS:
            print(ct)
            l = Landmark(ctype=ct)

            # check default
            #nose.tools.assert_equal(l.covariance, Covariance.new_covar(3))

            # set type-aligned covariance
            c = Covariance.new_covar(3, ct, 7)
            l.covariance = c