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

Before Change


        G = graphs.Sensor()
        A = G.W>0
        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):

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

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: neurosynth/neurosynth
Commit Name: 73675264dd48387319f62780b52d81389016cc1f
Time: 2014-03-24
Author: tyarkoni@gmail.com
File Name: neurosynth/base/dataset.py
Class Name: FeatureTable
Method Name: get_ids


Project Name: RaRe-Technologies/gensim
Commit Name: a31eab99dfbc6dcb7fe2ef149c59a30910adbbbd
Time: 2011-05-15
Author: radimrehurek@seznam.cz
File Name: src/gensim/similarities/docsim.py
Class Name: SparseMatrixSimilarity
Method Name: getSimilarities


Project Name: theislab/scanpy
Commit Name: c5c2d65ebd3ee375fa9855c326d88646ee403aa7
Time: 2020-12-03
Author: fidel.ramirez@gmail.com
File Name: scanpy/get.py
Class Name:
Method Name: obs_df