MCPcopy
hub / github.com/numpy/numpy / test_integer_repeat

Function test_integer_repeat

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

Source from the content-addressed store, hash-verified

1995
1996
1997def test_integer_repeat(int_func):
1998 rng = random.RandomState(123456789)
1999 fname, args, sha256 = int_func
2000 f = getattr(rng, fname)
2001 val = f(*args, size=1000000)
2002 if sys.byteorder != 'little':
2003 val = val.byteswap()
2004 res = hashlib.sha256(val.view(np.int8)).hexdigest()
2005 assert_(res == sha256)
2006
2007
2008def test_broadcast_size_error():

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…