

def test_single_nodes(self):
    G = nx.complete_bipartite_graph(2, 3)
    G.add_edge(2, 4)
    sbn = sb(G, nodes=[1, 2])
    assert_almost_equal(sbn[1], 0.85, places=2)
    assert_almost_equal(sbn[2], 0.77, places=2)
    G = nx.complete_bipartite_graph(2, 3)
    G.add_edge(0, 1)
    sbn = sb(G, nodes=[1, 2])
    assert_almost_equal(sbn[1], 0.73, places=2)
    assert_almost_equal(sbn[2], 0.82, places=2)

dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/algorithms/bipartite/tests/test_spectral_bipartivity.py TestSpectralBipartivity.test_single_nodes/original