MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / _ntuple

Function _ntuple

vtp/models/utils/text_utils.py:70–75  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

68
69# From PyTorch internals
70def _ntuple(n):
71 def parse(x):
72 if isinstance(x, collections.abc.Iterable):
73 return x
74 return tuple(repeat(x, n))
75 return parse
76
77
78to_1tuple = _ntuple(1)

Callers 1

text_utils.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected