You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def ind_nodes(self, graph=None):
""" Returns a list of all nodes in the graph with no dependencies. """
if graph is None:
graph = self.graph
dependent_nodes = set(tuple(node) for dependents in graph.items() for node in dependents)
return [node for node in graph.keys() if node not in dependent_nodes]
set(tuple(node) for dependents in graph.items() for node in dependents) : wrong code!!
corrected code (python 3 base):
dependent_nodes = set(node for dependents in iter(graph.values() )for node in dependents)
compare : py-dag:ind_nodes method
The text was updated successfully, but these errors were encountered:
set(tuple(node) for dependents in graph.items() for node in dependents) : wrong code!!
corrected code (python 3 base):
dependent_nodes = set(node for dependents in iter(graph.values() )for node in dependents)
compare : py-dag:ind_nodes method
The text was updated successfully, but these errors were encountered: