MCPcopy Index your code
hub / github.com/numpy/numpy / test_randint

Method test_randint

numpy/random/tests/test_random.py:1692–1708  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1690 assert_equal(out.shape, tgtShape)
1691
1692 def test_randint(self):
1693 _, _, _, tgtShape = self._create_arrays()
1694 itype = [bool, np.int8, np.uint8, np.int16, np.uint16,
1695 np.int32, np.uint32, np.int64, np.uint64]
1696 func = np.random.randint
1697 high = np.array([1])
1698 low = np.array([0])
1699
1700 for dt in itype:
1701 out = func(low, high, dtype=dt)
1702 assert_equal(out.shape, tgtShape)
1703
1704 out = func(low[0], high, dtype=dt)
1705 assert_equal(out.shape, tgtShape)
1706
1707 out = func(low, high[0], dtype=dt)
1708 assert_equal(out.shape, tgtShape)
1709
1710 def test_three_arg_funcs(self):
1711 argOne, argTwo, argThree, tgtShape = self._create_arrays()

Callers

nothing calls this directly

Calls 3

_create_arraysMethod · 0.95
assert_equalFunction · 0.90
funcFunction · 0.50

Tested by

no test coverage detected