diff options
author | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2019-11-19 14:27:51 +0000 |
---|---|---|
committer | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2019-11-19 14:49:02 +0000 |
commit | 77e77a28a4b9d858c39132711db41e67d7a023a7 (patch) | |
tree | a907ea3fd267e9d11216f04f95d30c900ee8cde7 /numpy | |
parent | d6ecf67f88fb61cf641e2370d3e54938232de09d (diff) | |
download | numpy-77e77a28a4b9d858c39132711db41e67d7a023a7.tar.gz |
DOC: Clarify return type for default rng
Ensure that default_rng has a return type to improve code completion
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/random/_generator.pyx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx index 39d05b32b..2d8455982 100644 --- a/numpy/random/_generator.pyx +++ b/numpy/random/_generator.pyx @@ -4393,11 +4393,15 @@ def default_rng(seed=None): Additionally, when passed a `BitGenerator`, it will be wrapped by `Generator`. If passed a `Generator`, it will be returned unaltered. + Returns + ------- + Generator + The initialized generator object. + Notes ----- - When ``seed`` is omitted or ``None``, a new `BitGenerator` and `Generator` will - be instantiated each time. This function does not manage a default global - instance. + If ``seed`` is not a `BitGenerator` or a `Generator`, a new `BitGenerator` + is instantiated. This function does not manage a default global instance. """ if _check_bit_generator(seed): # We were passed a BitGenerator, so just wrap it up. |