Example #1
0
 def test_npin(self):
     np.testing.assert_array_equal(self.A, gus.import_graph(self.A))
Example #2
0
 def test_wrongtypein(self):
     a = 5
     with self.assertRaises(TypeError):
         gus.import_graph(a)
     with self.assertRaises(TypeError):
         gus.import_graph(None)
Example #3
0
 def test_graphin(self):
     G = nx.from_numpy_array(self.A)
     np.testing.assert_array_equal(nx.to_numpy_array(G), gus.import_graph(G))