From c4e013e249f741b24c1c42f3f20f281a4175523d Mon Sep 17 00:00:00 2001 From: "cs15mtech11007@iith.ac.in" Date: Sat, 21 Jan 2017 15:38:26 +0530 Subject: [PATCH] Fix Errors --- .../test_factors/test_continuous/test_ContinuousFactor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pgmpy/tests/test_factors/test_continuous/test_ContinuousFactor.py b/pgmpy/tests/test_factors/test_continuous/test_ContinuousFactor.py index 6e7143a77..0bb811b62 100644 --- a/pgmpy/tests/test_factors/test_continuous/test_ContinuousFactor.py +++ b/pgmpy/tests/test_factors/test_continuous/test_ContinuousFactor.py @@ -379,9 +379,9 @@ def test_discretize(self): results3 = univariate_chi.discretize(RoundingDiscretizer, low=0, high=1, cardinality=3) results3 = [round(i, 6) for i in results3] - self.assertAlmostEqual(results1, [0.154375, 0.085531, 0.0, -0.085531], places=4) - self.assertAlmostEqual(results2, [-2.120911, -0.115055, 0.198042, 0.033288, 0.004727], places=4) - self.assertAlmostEqual(results3, [0.038335, 0.059015, 0.039992], places=4) + np.testing.assert_almost_equal(results1, [0.154375, 0.085531, 0.0, -0.085531],decimal=4) + np.testing.assert_almost_equal(results2, [-2.120911, -0.115055, 0.198042, 0.033288, 0.004727], decimal=4) + np.testing.assert_almost_equal(results3, [0.038335, 0.059015, 0.039992], decimal=4) def test_copy(self): copy1 = self.phi1.copy()