Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/pytorch
/ to_float32
Function
to_float32
caffe2/python/hypothesis_test_util.py:64–65 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
62
63
64
def
to_float32(x):
65
return
struct.unpack(
"f"
, struct.pack(
"f"
, float(x)))[0]
66
67
68
# "min_satisfying_examples" setting has been deprecated in hypothesis
Callers
1
floats
Function · 0.85
Calls
2
unpack
Method · 0.45
pack
Method · 0.45
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…