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

Function test_integer_repeat

numpy/random/tests/test_randomstate.py:2025–2033  ·  view source on GitHub ↗
(int_func)

Source from the content-addressed store, hash-verified

2023
2024
2025def test_integer_repeat(int_func):
2026 random.seed(123456789)
2027 fname, args, sha256 = int_func
2028 f = getattr(random, fname)
2029 val = f(*args, size=1000000)
2030 if sys.byteorder != 'little':
2031 val = val.byteswap()
2032 res = hashlib.sha256(val.view(np.int8)).hexdigest()
2033 assert_(res == sha256)
2034
2035
2036def test_broadcast_size_error():

Callers

nothing calls this directly

Calls 4

assert_Function · 0.90
fFunction · 0.85
byteswapMethod · 0.80
viewMethod · 0.45

Tested by

no test coverage detected