class_docstr: Represents a graph suitable for further processing with the graphcut package.
  
  The graph contains nodes, edges (directed) between the nodes (n-edges), edges
  between two terminals (called source and sink) and the nodes (t-edges), and a
  weight for each edge. 
  
  Notes
  -----
  The node-ids used by the graph are assumed to start with 1 and be
  continuous. This is not actually checked, except when calling the
  inconsistent() method, so be careful.
docstr: Sets all n-weights.
  
  Parameters
  ----------
  nweights : dict
      A dictionary with (node-id, node-id) tuples as keys and (weight-a-to-b, weight-b-to-a) as values.
docstr_tok: ["Sets","all","n-weights",".","Parameters","--","--","--","--","--","nweights",":","dict","A","dictionary","with","(","node-id",",","node-id",")","tuples","as","keys","and","(","weight-a-to-b",",","weight-b-to-a",")","as","values","."]
code: def set_nweights(self, nweights):
      r"""
      Sets all n-weights.
  
      Parameters
      ----------
      nweights : dict
          A dictionary with (node-id, node-id) tuples as keys and (weight-a-to-b, weight-b-to-a) as values.
      """
      self.__nweights = nweights
  
imports: from .maxflow import GraphDouble, GraphFloat
label_desc: Use image node_id 5 for calling the Graph obj's underlying member method code with example usage: obj.set_nweights(nweights) without return types