Hi I've recently upgraded from python-igraph 0.9 to igraph 0.10 since python-igraph seems is superceded by igraph (see: https://pypi.org/project/python-igraph/). I'm on MacOS, using conda.
However, when I run the following my get an error:
import leidenalg
import igraph as ig
G = ig.Graph.Famous('Zachary')
leidenalg.find_partition(G, leidenalg.ModularityVertexPartition)
Error Trace
---------------------------------------------------------------------------
BaseException Traceback (most recent call last)
/...02_mm_graphs.ipynb Cell 16 in <cell line: 4>()
2 import igraph as ig
3 G = ig.Graph.Famous('Zachary')
----> 4 leidenalg.find_partition(G, leidenalg.ModularityVertexPartition)
File ~/miniforge3/envs/.../lib/python3.9/site-packages/leidenalg/functions.py:81, in find_partition(graph, partition_type, initial_membership, weights, n_iterations, max_comm_size, seed, **kwargs)
79 if not weights is None:
80 kwargs['weights'] = weights
---> 81 partition = partition_type(graph,
82 initial_membership=initial_membership,
83 **kwargs)
84 optimiser = Optimiser()
86 optimiser.max_comm_size = max_comm_size
File ~/miniforge3/envs/.../lib/python3.9/site-packages/leidenalg/VertexPartition.py:456, in ModularityVertexPartition.__init__(self, graph, initial_membership, weights)
452 else:
453 # Make sure it is a list
454 weights = list(weights)
--> 456 self._partition = _c_leiden._new_ModularityVertexPartition(pygraph_t,
457 initial_membership, weights)
458 self._update_internal_membership()
BaseException: Could not construct partition: vector
Hi I've recently upgraded from
python-igraph
0.9 toigraph
0.10 sincepython-igraph
seems is superceded byigraph
(see: https://pypi.org/project/python-igraph/). I'm on MacOS, using conda.However, when I run the following my get an error:
Error Trace
My Conda env