MCPcopy Create free account
hub / github.com/numpy/numpy / uint32_to_float32

Function uint32_to_float32

numpy/random/tests/test_direct.py:49–50  ·  view source on GitHub ↗
(u)

Source from the content-addressed store, hash-verified

47
48
49def uint32_to_float32(u):
50 return ((u >> np.uint32(8)) * (1.0 / 2**24)).astype(np.float32)
51
52
53def uniform32_from_uint64(x):

Callers 3

uniform32_from_uint64Function · 0.85
uniform32_from_uint53Function · 0.85
uniform32_from_uint32Function · 0.85

Calls 1

astypeMethod · 0.80

Tested by

no test coverage detected