def test_createChainContext(self):
     chain = LikelihoodComputationChain()
     
     p = np.array([1,2])
     ctx = chain.createChainContext(p)
     assert ctx is not None
     assert np.all(ctx.getParams() == p)
示例#2
0
    def test_createChainContext(self):
        chain = LikelihoodComputationChain()

        p = np.array([1, 2])
        ctx = chain.createChainContext(p)
        assert ctx is not None
        assert np.all(ctx.getParams() == p)
示例#3
0
    def test_createChainContext_params(self):
        keys = ["a", "b"]
        params = Params((keys[0], 0), (keys[1], 1))
        chain = LikelihoodComputationChain()
        chain.params = params

        p = np.array([1, 2])
        ctx = chain.createChainContext(p)

        assert ctx is not None
        assert np.all(ctx.getParams().keys == keys)
        assert np.all(ctx.getParams()[0] == p[0])
        assert np.all(ctx.getParams()[1] == p[1])
 def test_createChainContext_params(self):
     keys = ["a", "b"]
     params = Params((keys[0], 0),
                     (keys[1], 1))
     chain = LikelihoodComputationChain()
     chain.params = params
     
     p = np.array([1,2])
     ctx = chain.createChainContext(p)
     
     assert ctx is not None
     assert np.all(ctx.getParams().keys == keys) 
     assert np.all(ctx.getParams()[0] == p[0]) 
     assert np.all(ctx.getParams()[1] == p[1])