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

Function uniform32_from_uint64

numpy/random/tests/test_direct.py:53–59  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

51
52
53def uniform32_from_uint64(x):
54 x = np.uint64(x)
55 upper = np.array(x >> np.uint64(32), dtype=np.uint32)
56 lower = np.uint64(0xffffffff)
57 lower = np.array(x & lower, dtype=np.uint32)
58 joined = np.column_stack([lower, upper]).ravel()
59 return uint32_to_float32(joined)
60
61
62def uniform32_from_uint53(x):

Callers 1

uniform32_from_uintFunction · 0.85

Calls 2

uint32_to_float32Function · 0.85
ravelMethod · 0.45

Tested by

no test coverage detected