lib/networkx/graph.rb
# Removes multiple nodes from the graph
#
# @example
#   graph.remove_nodes(["Noida", "Bangalore"])
#
# @param nodes [Array<Object>] the array of nodes to be removed
Removes multiple nodes from the graph
Removes multiple nodes from the graph
def remove_nodes(nodes)
      case nodes
      when Set, Array
        nodes.each { |node| remove_node(node) }
      else
        raise ArgumentError, 'Expected argument to be an Array or Set of nodes, '\
                             "received #{nodes.class.name} instead."
      end
    end
def remove_nodes ( nodes ) case nodes when Set , Array nodes . each { | node | remove_node ( node ) } else raise ArgumentError , 'Expected argument to be an Array or Set of nodes, ' "received #{nodes.class.name} instead." end end
Removes multiple nodes from the graph
Removes multiple nodes from the graph
nodes
the array of nodes to be removed
the array of nodes to be removed
example
None