I followed the instructions and examples in the manual https://leidenalg.readthedocs.io/en/latest/advanced.html#fixed-nodes but I noticed that with my toy data, in the last code step there, diff = optimiser.optimise_partition(partition, is_membership_fixed=is_membership_fixed) I get this error:
terminate called after throwing an instance of 'Exception'
what(): Node size vector not the same size as the number of nodes.
Aborted (core dumped)
There are two things that need to be fixed for this.
[x] Replace partition with new_partition in the documentation.
[x] Not throw an Exception but correctly set a Python error (PyErr_SetStrring).
A user of the library reported that:
There are two things that need to be fixed for this.
partition
withnew_partition
in the documentation.Exception
but correctly set a Python error (PyErr_SetStrring
).