Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pytorch/tutorials
/ zeroPadding
Function
zeroPadding
beginner_source/chatbot_tutorial.py:496–497 ·
view source on GitHub ↗
(l, fillvalue=PAD_token)
Source
from the content-addressed store, hash-verified
494
495
496
def
zeroPadding(l, fillvalue=PAD_token):
497
return
list(itertools.zip_longest(*l, fillvalue=fillvalue))
498
499
def
binaryMatrix(l, value=PAD_token):
500
m = []
Callers
2
inputVar
Function · 0.85
outputVar
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected