diff options
-rw-r--r-- | numpy/random/mtrand/mtrand.pyx | 15 | ||||
-rw-r--r-- | numpy/random/tests/test_random.py | 2 |
2 files changed, 5 insertions, 12 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx index c83046e2e..5f1039cb2 100644 --- a/numpy/random/mtrand/mtrand.pyx +++ b/numpy/random/mtrand/mtrand.pyx @@ -2328,17 +2328,9 @@ cdef class RandomState: where :math:`Y_{q}` is the Chi-square with q degrees of freedom. - In Delhi (2007), it is noted that the noncentral chi-square is - useful in bombing and coverage problems, the probability of - killing the point target given by the noncentral chi-squared - distribution. - References ---------- - .. [1] Delhi, M.S. Holla, "On a noncentral chi-square distribution in - the analysis of weapon systems effectiveness", Metrika, - Volume 15, Number 1 / December, 1970. - .. [2] Wikipedia, "Noncentral chi-squared distribution" + .. [1] Wikipedia, "Noncentral chi-squared distribution" https://en.wikipedia.org/wiki/Noncentral_chi-squared_distribution Examples @@ -2368,7 +2360,6 @@ cdef class RandomState: >>> values = plt.hist(np.random.noncentral_chisquare(3, 20, 100000), ... bins=200, density=True) >>> plt.show() - """ cdef ndarray odf, ononc cdef double fdf, fnonc @@ -3539,9 +3530,9 @@ cdef class RandomState: Parameters ---------- mean : float or array_like of floats - Distribution mean, should be > 0. + Distribution mean, must be > 0. scale : float or array_like of floats - Scale parameter, should be >= 0. + Scale parameter, must be > 0. size : int or tuple of ints, optional Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. If size is ``None`` (default), diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py index d4721bc62..656e38dc8 100644 --- a/numpy/random/tests/test_random.py +++ b/numpy/random/tests/test_random.py @@ -1354,6 +1354,8 @@ class TestBroadcast(object): assert_array_almost_equal(actual, desired, decimal=14) assert_raises(ValueError, wald, bad_mean, scale * 3) assert_raises(ValueError, wald, mean, bad_scale * 3) + assert_raises(ValueError, wald, 0.0, 1) + assert_raises(ValueError, wald, 0.5, 0.0) def test_triangular(self): left = [1] |