docstr: Tests that the :func:`networkx.from_numpy_array` function
  interprets integer weights as the number of parallel edges when
  creating a multigraph.
code: def test_from_numpy_array_parallel_edges(self):
      """Tests that the :func:`networkx.from_numpy_array` function
      interprets integer weights as the number of parallel edges when
      creating a multigraph.
  
      """
      A = np.array([[1, 1], [1, 2]])
      # First, with a simple graph, each integer entry in the adjacency
      # matrix is interpreted as the weight of a single edge in the graph.
      expected = nx.DiGraph()
      edges = [(0, 0), (0, 1), (1, 0)]
      expected.add_weighted_edges_from([(u, v, 1) for (u, v) in edges])
      expected.add_edge(1, 1, weight=2)
      actual = nx.from_numpy_array(
          A, parallel_edges=True, create_using=nx.DiGraph
      )
      assert graphs_equal(actual, expected)
      actual = nx.from_numpy_array(
          A, parallel_edges=False, create_using=nx.DiGraph
      )
      assert graphs_equal(actual, expected)
      # Now each integer entry in the adjacency matrix is interpreted as the
      # number of parallel edges in the graph if the appropriate keyword
      # argument is specified.
      edges = [(0, 0), (0, 1), (1, 0), (1, 1), (1, 1)]
      expected = nx.MultiDiGraph()
      expected.add_weighted_edges_from([(u, v, 1) for (u, v) in edges])
      actual = nx.from_numpy_array(
          A, parallel_edges=True, create_using=nx.MultiDiGraph
      )
      assert graphs_equal(actual, expected)
      expected = nx.MultiDiGraph()
      expected.add_edges_from(set(edges), weight=1)
      # The sole self-loop (edge 0) on vertex 1 should have weight 2.
      expected[1][1][0]["weight"] = 2
      actual = nx.from_numpy_array(
          A, parallel_edges=False, create_using=nx.MultiDiGraph
      )
      assert graphs_equal(actual, expected)
  
imports: import pytest
  import networkx
  from networkx.generators.classic import barbell_graph, cycle_graph, path_graph
  from networkx.utils import graphs_equal
label_desc: Use image node_id 14 for calling the TestConvertNumpyArray obj's underlying member method code with example usage: obj.test_from_numpy_array_parallel_edges() without return types