Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pytorch/pytorch
/ NamedTuple
Function
NamedTuple
caffe2/python/schema.py:932–934 ·
view source on GitHub ↗
(name_prefix, *fields)
Source
from the content-addressed store, hash-verified
930
931
932
def
NamedTuple(name_prefix, *fields):
933
return
Struct(* [(
'%s_%d'
% (name_prefix, i), field)
934
for
i, field in enumerate(fields)])
935
936
937
def
Tuple(*fields):
Callers
5
_out_wrapper
Function · 0.85
test_namedtuple_type_inference
Method · 0.85
test_typing_namedtuple
Method · 0.85
Tuple
Function · 0.85
RawTuple
Function · 0.85
Calls
1
Struct
Class · 0.85
Tested by
2
test_namedtuple_type_inference
Method · 0.68
test_typing_namedtuple
Method · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…