MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / flatten

Function flatten

nlp_class3/memory_network.py:107–112  ·  view source on GitHub ↗
(l)

Source from the content-addressed store, hash-verified

105 return not isinstance(el, (str, bytes))
106
107def flatten(l):
108 for el in l:
109 if should_flatten(el):
110 yield from flatten(el)
111 else:
112 yield el
113
114
115

Callers 1

get_dataFunction · 0.70

Calls 1

should_flattenFunction · 0.85

Tested by

no test coverage detected