17
0
Files
python-python-louvain/fix-test-karate.patch
Daniel Garcia e7c07e34de - Update to 0.16:
* Fix #86. When computing the change in modularity after alternating the
    block membership of a node, the resolution parameter was multiplied to the
    wrong term.
    As a result, the current code fails to correctly implement the Louvain
    algorithm, except for the special case when the resolution parameter is set
    to one.
- Add fix-test-karate.patch to fix tests with networkx<=2.7
  gh#taynaud/python-louvain#95

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-python-louvain?expand=0&rev=18
2022-10-14 09:15:21 +00:00

14 lines
672 B
Diff

Index: python-louvain-0.16/test_community.py
===================================================================
--- python-louvain-0.16.orig/test_community.py
+++ python-louvain-0.16/test_community.py
@@ -203,7 +203,7 @@ class BestPartitionTest(unittest.TestCas
self.assertAlmostEqual(co.modularity(part, graph),
co.modularity(part_weight,
graph,
- "test_weight"), places=2)
+ "test_weight"), places=1)
part_res_low = co.best_partition(graph, resolution=0.1)
self.assertTrue(