code: def testAdjacencyNumPy(self):
      mat = np.array(
          [[0, 1, 1, 0], [1, 0, 0, 0], [0, 0, 2, 0], [0, 1, 0, 0]],
      )
  
      # ADJ_DIRECTED (default)
      g = Graph.Adjacency(mat)
      el = g.get_edgelist()
      self.assertTrue(
          el == [(0, 1), (0, 2), (1, 0), (2, 2), (2, 2), (3, 1)]
      )
  
      # ADJ MIN
      g = Graph.Adjacency(mat, mode="min")
      el = g.get_edgelist()
      self.assertTrue(el == [(0, 1), (2, 2), (2, 2)])
  
      # ADJ MAX
      g = Graph.Adjacency(mat, mode="max")
      el = g.get_edgelist()
      self.assertFalse(g.is_directed())
      self.assertEqual(4, g.vcount())
      self.assertTrue(el == [(0, 1), (0, 2), (1, 3), (2, 2), (2, 2)])
  
      # ADJ LOWER
      g = Graph.Adjacency(mat, mode="lower")
      el = g.get_edgelist()
      self.assertFalse(g.is_directed())
      self.assertEqual(4, g.vcount())
      self.assertTrue(el == [(0, 1), (2, 2), (2, 2), (1, 3)])
  
      # ADJ UPPER
      g = Graph.Adjacency(mat, mode="upper")
      el = g.get_edgelist()
      self.assertFalse(g.is_directed())
      self.assertEqual(4, g.vcount())
      self.assertTrue(el == [(0, 1), (0, 2), (2, 2), (2, 2)])
  
imports: import unittest
  from igraph import Graph, InternalError
label_desc: Use image node_id 14 for calling the GeneratorTests obj's underlying member method code with example usage: obj.testAdjacencyNumPy() without return types