def test_log_pdf(self):
        # test some answers
        X_1 = numpy.array([[1],[0]])
        parameters = dict(mu=0.0, rho=1.0)
        log_pdf = self.component_class.log_pdf(X_1, parameters)
        assert len(log_pdf) == 2
        assert math.fabs(-1.4189385332046727-log_pdf[0,0]) < .00000001
        assert math.fabs(-0.91893853320467267-log_pdf[1,0]) < .00000001

        parameters = dict(mu=2.2, rho=12.1)
        log_pdf = self.component_class.log_pdf(X_1, parameters)
        assert len(log_pdf) == 2
        assert math.fabs(log_pdf[0,0]--8.38433580690333) < .00000001
        assert math.fabs(-28.954335806903334-log_pdf[1,0]) < .00000001

        # points that are farther away from the mean should be less likely
        parameters = dict(mu=0.0, rho=1.0)
        lspc = numpy.linspace(0,10,num=20)
        X_2 = numpy.array([[x] for x in lspc])
        log_pdf = self.component_class.log_pdf(X_2, parameters)
        assert len(log_pdf) == 20
        for n in range(1,20):
            assert log_pdf[n-1,0] > log_pdf[n,0]
dataset/ETHPy150Open probcomp/crosscat/src/tests/unit_tests/test_continuous_component_model.py/TestContinuousComponentModelExtensions_static.test_log_pdf/swapped operands of `-`