Skip to content

Update square_clustering #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Schefflera-Arboricola opened this issue May 7, 2025 · 0 comments · Fixed by #113
Closed

Update square_clustering #109

Schefflera-Arboricola opened this issue May 7, 2025 · 0 comments · Fixed by #113
Labels
good first issue Good for newcomers

Comments

@Schefflera-Arboricola
Copy link
Member

Test failures due to recent changes made in PR networkx/networkx#7810

square clustering: error msg

=================================== FAILURES ===================================
____________ TestSquareClustering.test_self_loops_square_clustering ____________

self = <networkx.algorithms.tests.test_cluster.TestSquareClustering object at 0x1044fad50>

    def test_self_loops_square_clustering(self):
        G = nx.path_graph(5)
        assert nx.square_clustering(G) == {0: 0, 1: 0, 2: 0, 3: 0, 4: 0}
        G.add_edges_from([(0, 0), (1, 1), (2, 2)])
>       assert nx.square_clustering(G) == {0: 0, 1: 0, 2: 0, 3: 0, 4: 0}
E       assert {0: 1, 1: 0.5..., 3: 0.0, ...} == {0: 0, 1: 0, 2: 0, 3: 0, ...}
E         
E         Omitting 2 identical items, use -vv to show
E         Differing items:
E         {0: 1} != {0: 0}
E         {1: 0.5} != {1: 0}
E         {2: 0.2} != {2: 0}
E         
E         Full diff:
E           {
E         -     0: 0,
E         ?        ^
E         +     0: 1,
E         ?        ^
E         -     1: 0,
E         +     1: 0.5,
E         ?         ++
E         -     2: 0,
E         +     2: 0.2,
E         ?         ++
E         -     3: 0,
E         +     3: 0.0,
E         ?        ++
E               4: 0,
E           }

/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/networkx/algorithms/tests/test_cluster.py:499: AssertionError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Development

Successfully merging a pull request may close this issue.

1 participant