From d8953d7771674dd010a6c49a4f2aab49fdba6470 Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Mon, 28 Aug 2017 00:01:00 +0100 Subject: DOC: Fix type definitions in mtrand Improve description of dtype requirements to correctly indicate float is supported Add required range [skip ci] --- numpy/random/mtrand/mtrand.pyx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'numpy') diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx index aff0a687c..9e8a79804 100644 --- a/numpy/random/mtrand/mtrand.pyx +++ b/numpy/random/mtrand/mtrand.pyx @@ -2007,10 +2007,10 @@ cdef class RandomState: Parameters ---------- - dfnum : int or array_like of ints - Degrees of freedom in numerator. Should be greater than zero. - dfden : int or array_like of ints - Degrees of freedom in denominator. Should be greater than zero. + dfnum : float or array_like of floats + Degrees of freedom in numerator, should be > 0. + dfden : float or array_like of float + Degrees of freedom in denominator, should 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), @@ -2111,7 +2111,7 @@ cdef class RandomState: ---------- dfnum : float or array_like of floats Numerator degrees of freedom, should be > 0. - + .. versionchanged:: 1.14.0 Earlier NumPy versions required dfnum > 1. dfden : float or array_like of floats @@ -2210,8 +2210,8 @@ cdef class RandomState: Parameters ---------- - df : int or array_like of ints - Number of degrees of freedom. + df : float or array_like of floats + Number of degrees of freedom, should 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), @@ -2289,9 +2289,11 @@ cdef class RandomState: Parameters ---------- - df : int or array_like of ints - Degrees of freedom, should be > 0 as of NumPy 1.10.0, - should be > 1 for earlier versions. + df : float or array_like of floats + Degrees of freedom, should be > 0. + + .. versionchanged:: 1.10.0 + Earlier NumPy versions required dfnum > 1. nonc : float or array_like of floats Non-centrality, should be non-negative. size : int or tuple of ints, optional @@ -2459,7 +2461,7 @@ cdef class RandomState: Parameters ---------- - df : int or array_like of ints + df : float or array_like of floats Degrees of freedom, should be > 0. size : int or tuple of ints, optional Output shape. If the given shape is, e.g., ``(m, n, k)``, then -- cgit v1.2.1