def test_1(self):
        c = HestonHullWhiteCorrelationConstraint(-0.5)

        # Heston parameter p[3] is correlation

        p = qlarray_from_pyarray([1, 1, 1, 0.5, 1])

        res = c.test(p)

        self.assertEqual(res, True)
예제 #2
0
파일: test_math.py 프로젝트: enthought/pyql
 def test_array_conversion(self):
     p = [1,2,3,4]
     x = qlarray_from_pyarray(p)
     self.assertEqual(x[2], p[2])
예제 #3
0
 def test_array_conversion(self):
     p = [1, 2, 3, 4]
     x = qlarray_from_pyarray(p)
     self.assertEqual(x[2], p[2])