Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
Indexed
MCP
copy
Index your code
hub
/
github.com/tensorpack/tensorpack
/ _format
Function
_format
tensorpack/utils/utils.py:58–59 ·
view source on GitHub ↗
(v, u)
Source
from the content-addressed store, hash-verified
56
vals[-1] = sec
57
58
def
_format(v, u):
59
return
"{:.3g} {}{}"
.format(v, u,
"s"
if
v > 1
else
""
)
60
61
ans = []
62
for
v, u in zip(vals, units):
Callers
1
humanize_time_delta
Function · 0.85
Calls
1
format
Method · 0.80
Tested by
no test coverage detected