Commit 1857b5d7 authored by Dr.李's avatar Dr.李

try to fix

parent e84b1fbf
...@@ -79,7 +79,7 @@ class TestLinearBuild(unittest.TestCase): ...@@ -79,7 +79,7 @@ class TestLinearBuild(unittest.TestCase):
self.assertTrue(np.all(w >= -eplson)) self.assertTrue(np.all(w >= -eplson))
calc_risk = (w - bm) @ self.risk_exp / np.abs(bm @ self.risk_exp) calc_risk = (w - bm) @ self.risk_exp / np.abs(bm @ self.risk_exp)
self.assertTrue(np.all(np.abs(calc_risk) <= 1.0001e-2)) self.assertTrue(np.all(np.abs(calc_risk) <= 1.01e-2))
def test_linear_build_with_to_constraint(self): def test_linear_build_with_to_constraint(self):
bm = self.bm / self.bm.sum() bm = self.bm / self.bm.sum()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment