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

Before Change


        d = np.sum(A.toarray(),axis=1).squeeze()
        dw = np.sum(G.W.toarray(),axis=1).squeeze()
        self.assertAlmostEqual(np.linalg.norm(G.d-d),0)
        self.assertAlmostEqual(np.linalg.norm(G.dw-dw),0)

    def test_laplacian(self):
        // TODO: should test correctness.

After Change


        self.assertEqual(kj.shape[0], G.Ne)

    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: 6

Non-data size: 4

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: bethgelab/foolbox
Commit Name: 66bd36230834da701e9ea1cea5062e2c1839a436
Time: 2017-06-16
Author: jonasrauber@users.noreply.github.com
File Name: foolbox/tests/test_distances.py
Class Name:
Method Name: test_str_repr


Project Name: nilearn/nilearn
Commit Name: a04fdeac1f3d7ad8f0e49393bb48e090c124ef99
Time: 2017-11-17
Author: jerome@dockes.org
File Name: nilearn/datasets/tests/test_atlas.py
Class Name:
Method Name: test_fetch_atlas_talairach


Project Name: descarteslabs/descarteslabs-python
Commit Name: 2c76358bcdbd01b199c04893370c3b06e867cca9
Time: 2020-03-30
Author: 51922948+sdelany2@users.noreply.github.com
File Name: descarteslabs/workflows/types/array/tests/test_array.py
Class Name:
Method Name: test_init


Project Name: nilearn/nilearn
Commit Name: 3d9d0b79be01a00d9cc055e40d5b1b8bb6067292
Time: 2018-07-11
Author: sylvain.lannuzel@student.ecp.fr
File Name: nilearn/tests/test_masking.py
Class Name:
Method Name: test_compute_gray_matter_mask


Project Name: scikit-learn-contrib/DESlib
Commit Name: e8d6fd1a77df735a6362003014515d8249617011
Time: 2021-03-27
Author: rafaelmenelau@gmail.com
File Name: deslib/tests/des/test_base.py
Class Name:
Method Name: test_classify_instance_hybrid