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

Function uniform_from_uint32

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

Source from the content-addressed store, hash-verified

92
93
94def uniform_from_uint32(x):
95 out = np.empty(len(x) // 2)
96 for i in range(0, len(x), 2):
97 a = x[i] >> 5
98 b = x[i + 1] >> 6
99 out[i // 2] = (a * 67108864.0 + b) / 9007199254740992.0
100 return out
101
102
103def uniform_from_dsfmt(x):

Callers 2

uniform_from_uintFunction · 0.85
gauss_from_uintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected