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

Method test_randint

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

Source from the content-addressed store, hash-verified

1719 assert_equal(out.shape, self.tgtShape)
1720
1721 def test_randint(self):
1722 itype = [bool, np.int8, np.uint8, np.int16, np.uint16,
1723 np.int32, np.uint32, np.int64, np.uint64]
1724 func = np.random.randint
1725 high = np.array([1])
1726 low = np.array([0])
1727
1728 for dt in itype:
1729 out = func(low, high, dtype=dt)
1730 assert_equal(out.shape, self.tgtShape)
1731
1732 out = func(low[0], high, dtype=dt)
1733 assert_equal(out.shape, self.tgtShape)
1734
1735 out = func(low, high[0], dtype=dt)
1736 assert_equal(out.shape, self.tgtShape)
1737
1738 def test_three_arg_funcs(self):
1739 funcs = [np.random.noncentral_f, np.random.triangular,

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
funcFunction · 0.50

Tested by

no test coverage detected