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

Method test_one_arg_funcs

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

Source from the content-addressed store, hash-verified

1642 return np.array([2]), np.array([3]), np.array([4]), (1,)
1643
1644 def test_one_arg_funcs(self):
1645 argOne, _, _, tgtShape = self._create_arrays()
1646 funcs = (np.random.exponential, np.random.standard_gamma,
1647 np.random.chisquare, np.random.standard_t,
1648 np.random.pareto, np.random.weibull,
1649 np.random.power, np.random.rayleigh,
1650 np.random.poisson, np.random.zipf,
1651 np.random.geometric, np.random.logseries)
1652
1653 probfuncs = (np.random.geometric, np.random.logseries)
1654
1655 for func in funcs:
1656 if func in probfuncs: # p < 1.0
1657 out = func(np.array([0.5]))
1658
1659 else:
1660 out = func(argOne)
1661
1662 assert_equal(out.shape, tgtShape)
1663
1664 def test_two_arg_funcs(self):
1665 argOne, argTwo, _, 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