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

Method test_one_arg_funcs

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

Source from the content-addressed store, hash-verified

1673 self.tgtShape = (1,)
1674
1675 def test_one_arg_funcs(self):
1676 funcs = (np.random.exponential, np.random.standard_gamma,
1677 np.random.chisquare, np.random.standard_t,
1678 np.random.pareto, np.random.weibull,
1679 np.random.power, np.random.rayleigh,
1680 np.random.poisson, np.random.zipf,
1681 np.random.geometric, np.random.logseries)
1682
1683 probfuncs = (np.random.geometric, np.random.logseries)
1684
1685 for func in funcs:
1686 if func in probfuncs: # p < 1.0
1687 out = func(np.array([0.5]))
1688
1689 else:
1690 out = func(self.argOne)
1691
1692 assert_equal(out.shape, self.tgtShape)
1693
1694 def test_two_arg_funcs(self):
1695 funcs = (np.random.uniform, np.random.normal,

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
funcFunction · 0.50

Tested by

no test coverage detected