(int_func)
| 1995 | |
| 1996 | |
| 1997 | def 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 | |
| 2008 | def test_broadcast_size_error(): |