diff options
author | gfyoung <gfyoung@mit.edu> | 2016-01-16 00:40:37 +0000 |
---|---|---|
committer | gfyoung <gfyoung@mit.edu> | 2016-01-25 00:37:44 +0000 |
commit | 637ad965ae7555157e859a747f276c20c5f91b9a (patch) | |
tree | c0ad42e3952ce2df1160589682d62732d9932890 /numpy/random | |
parent | d641eedd8214d89719ea8e0fa488232a1aae86bd (diff) | |
download | numpy-637ad965ae7555157e859a747f276c20c5f91b9a.tar.gz |
DOC: Clarify behavior in np.random.uniform
Although the arguments are specified as 'high'
and 'low', it is possible to pass in values for
'low' and 'high' where 'low' >= 'high' and still
obtain well-defined behavior. The documentation
has been expanded to reflect this fact, with a
note to discourage passing in arguments satisfying
'low' > 'high'.
Diffstat (limited to 'numpy/random')
-rw-r--r-- | numpy/random/mtrand/mtrand.pyx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx index cf8d28cb0..a419e51a8 100644 --- a/numpy/random/mtrand/mtrand.pyx +++ b/numpy/random/mtrand/mtrand.pyx @@ -1496,6 +1496,12 @@ cdef class RandomState: anywhere within the interval ``[a, b)``, and zero elsewhere. + When ``high`` == ``low``, values of ``low`` will be returned. + If ``high`` < ``low``, the results are officially undefined + and may eventually raise an error, i.e. do not rely on this + function to behave when passed arguments satisfying that + inequality condition. + Examples -------- Draw samples from the distribution: |