508545f2c9a982a38a243ec95c7a5cdd266ed358,pygsp/tests/test_graphs.py,TestCase,test_degree,#TestCase#,46

Before Change


        W = np.arange(1,17).reshape(4, 4)
        G = graphs.Graph(W)
        d = 4*np.ones([4])
        dw = np.sum(W,axis=1).squeeze()
        self.assertAlmostEqual(np.linalg.norm(G.d-d),0)
        self.assertAlmostEqual(np.linalg.norm(G.dw-dw),0)

        G = graphs.Sensor()

After Change


    def test_degree(self):
        W = 0.3 * (np.ones((4, 4)) - np.diag(4 * [1]))
        G = graphs.Graph(W)
        A = np.ones(W.shape) - np.diag(np.ones(4))
        np.testing.assert_allclose(G.A.toarray(), A)
        np.testing.assert_allclose(G.d, 3 * np.ones([4]))
        np.testing.assert_allclose(G.dw, 3 * 0.3)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: epfl-lts2/pygsp
Commit Name: 508545f2c9a982a38a243ec95c7a5cdd266ed358
Time: 2017-11-23
Author: michael.defferrard@epfl.ch
File Name: pygsp/tests/test_graphs.py
Class Name: TestCase
Method Name: test_degree


Project Name: cornellius-gp/gpytorch
Commit Name: 85e8cf0742048b55a20418441e4e9e51444c3f54
Time: 2019-10-25
Author: balandat@fb.com
File Name: gpytorch/likelihoods/multitask_gaussian_likelihood.py
Class Name: _MultitaskGaussianLikelihoodBase
Method Name: _eval_corr_matrix


Project Name: facebookresearch/Horizon
Commit Name: 20c7dac379a56a69fc0a2fa56a2729eeced2c5ac
Time: 2020-04-22
Author: czxttkl@fb.com
File Name: reagent/models/seq2slate_reward.py
Class Name: Seq2SlateRewardNet
Method Name: forward