summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-09-02 02:05:41 -0600
committerGitHub <noreply@github.com>2021-09-02 02:05:41 -0600
commit9fca8f0c1a3f16f8f62ae574ec1a79b5b588214e (patch)
tree41a1d2534a5daeaa61ebd56d42e2c0e49e4bab35
parent68299575d8595d904aff6f28e12d21bf6428a4ba (diff)
parentde5d3454820cf1918b7241c2c60c26347f4f06e0 (diff)
downloadnumpy-9fca8f0c1a3f16f8f62ae574ec1a79b5b588214e.tar.gz
Merge pull request #19813 from numpy/doc/user-guide-default-rng
DOC: Fix import of default_rng
-rw-r--r--doc/source/user/basics.creation.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/source/user/basics.creation.rst b/doc/source/user/basics.creation.rst
index b0b54d4ed..a68def887 100644
--- a/doc/source/user/basics.creation.rst
+++ b/doc/source/user/basics.creation.rst
@@ -235,7 +235,7 @@ library. Below, two arrays are created with shapes (2,3) and (2,3,2),
respectively. The seed is set to 42 so you can reproduce these
pseudorandom numbers::
- >>> import numpy.random.default_rng
+ >>> from numpy.random import default_rng
>>> default_rng(42).random((2,3))
array([[0.77395605, 0.43887844, 0.85859792],
[0.69736803, 0.09417735, 0.97562235]])