summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-12-16 05:42:20 -0700
committerGitHub <noreply@github.com>2020-12-16 05:42:20 -0700
commitb6391657bcbaebf9b917ae2f4472ba9c8e872cba (patch)
tree3b2ace26de590b238dc574e3727a40d62b2f17da
parent8e038f4a930c0c899e599ee58a56391e026a608f (diff)
parent768e9e0a3cbe5febf5d7e031d5164b257add6237 (diff)
downloadnumpy-b6391657bcbaebf9b917ae2f4472ba9c8e872cba.tar.gz
Merge pull request #18008 from mattip/fix1
DOC: fix for doctests
-rw-r--r--doc/source/user/quickstart.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/source/user/quickstart.rst b/doc/source/user/quickstart.rst
index 8719e6eef..ab5bb5318 100644
--- a/doc/source/user/quickstart.rst
+++ b/doc/source/user/quickstart.rst
@@ -177,7 +177,7 @@ The function ``zeros`` creates an array full of zeros, the function
``ones`` creates an array full of ones, and the function ``empty``
creates an array whose initial content is random and depends on the
state of the memory. By default, the dtype of the created array is
-``float64``.
+``float64``, but it can be specified via the key word argument ``dtype``.
::
@@ -185,7 +185,7 @@ state of the memory. By default, the dtype of the created array is
array([[0., 0., 0., 0.],
[0., 0., 0., 0.],
[0., 0., 0., 0.]])
- >>> np.ones((2, 3, 4), dtype=np.int16) # dtype can also be specified
+ >>> np.ones((2, 3, 4), dtype=np.int16)
array([[[1, 1, 1, 1],
[1, 1, 1, 1],
[1, 1, 1, 1]],
@@ -193,8 +193,8 @@ state of the memory. By default, the dtype of the created array is
[[1, 1, 1, 1],
[1, 1, 1, 1],
[1, 1, 1, 1]]], dtype=int16)
- >>> np.empty((2, 3)) # uninitialized, the result may vary
- array([[3.73603959e-262, 6.02658058e-154, 6.55490914e-260],
+ >>> np.empty((2, 3))
+ array([[3.73603959e-262, 6.02658058e-154, 6.55490914e-260], # may vary
[5.30498948e-313, 3.14673309e-307, 1.00000000e+000]])
To create sequences of numbers, NumPy provides the ``arange`` function