igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Warnings


From: Herb Roseman
Subject: [igraph] Warnings
Date: Wed, 07 Jan 2015 16:24:10 +0000

I am trying to suppress the warning of a non-path from  get_shortest_paths
 
I set up a simple test program nettest to try to see how it is done.  The beginning of the program, which forces a warning, is below.  It doesn't work.  The program runs though, but Python throws the warning.  My guess is that the problem is me :(, but I think the program follows the on-line documentation for warnings.

Thanks for your help.

Herb

Here's the program:

import warnings
import igraph
def fxn():
    warnings.warn ("g.get_shortest_paths",RuntimeWarning)
    
def nettest():
    with warnings.catch_warnings():
        warnings.simplefilter("ignore")
        fxn()
    g = igraph.Graph()
    g.add_vertices(6)
    g.add_edges([(0,1),(1,2),(3,4),(4,5),(5,3)])
    shpath = g. get_shortest_paths (1,4)
    (more stuff)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]