> For the get_shortest_paths function it would be convenient if the function > returned an empty list if the path was not possible. This would provide a > simpler way of handling this situation than the runtime warning message. > Suppressing this message seems complex to the new user of python. The warning comes from the C layer:
https://github.com/igraph/igraph/blob/master/src/structural_properties.c#L740 The Python interface simply turns every warning coming from the C layer into a proper Python warning and although I could make a special exception for this warning in the Python layer, I'm a bit reluctant to do that -- others might dislike some other warning coming from the C layer and then I would have to do the same for those warnings as well :) Is there any particular reason why this warning bothers you so much that you would like to silence it at all costs? An alternative solution would be to add a Boolean flag to the Python module that the user can use to disable the translation of warnings coming from the C layer into Python warnings; you could then say something like "igraph.warnings = False" from Python to turn these warnings off. All the best, T. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
