Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
107
def
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_data
Function · 0.70
Calls
1
should_flatten
Function · 0.85
Tested by
no test coverage detected