summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/user/basics.indexing.rst3
-rw-r--r--doc/source/user/basics.types.rst9
-rw-r--r--tools/refguide_check.py3
3 files changed, 5 insertions, 10 deletions
diff --git a/doc/source/user/basics.indexing.rst b/doc/source/user/basics.indexing.rst
index d435a13e3..5d95d8314 100644
--- a/doc/source/user/basics.indexing.rst
+++ b/doc/source/user/basics.indexing.rst
@@ -1,3 +1,6 @@
+.. for doctest:
+ >>> import numpy as np
+
.. _basics.indexing:
****************************************
diff --git a/doc/source/user/basics.types.rst b/doc/source/user/basics.types.rst
index 3a49d213b..3d5b380db 100644
--- a/doc/source/user/basics.types.rst
+++ b/doc/source/user/basics.types.rst
@@ -104,11 +104,7 @@ aliases are provided (See :ref:`sized-aliases`).
NumPy numerical types are instances of ``dtype`` (data-type) objects, each
having unique characteristics. Once you have imported NumPy using
-
- ::
-
- >>> import numpy as np
-
+``>>> import numpy as np``
the dtypes are available as ``np.bool_``, ``np.float32``, etc.
Advanced types, not listed above, are explored in
@@ -127,7 +123,6 @@ Data-types can be used as functions to convert python numbers to array scalars
to arrays of that type, or as arguments to the dtype keyword that many numpy
functions or methods accept. Some examples::
- >>> import numpy as np
>>> x = np.float32(1.0)
>>> x
1.0
@@ -150,7 +145,7 @@ We recommend using dtype objects instead.
To convert the type of an array, use the .astype() method (preferred) or
the type itself as a function. For example: ::
- >>> z.astype(float)
+ >>> z.astype(float) #doctest: +NORMALIZE_WHITESPACE
array([0., 1., 2.])
>>> np.int8(z)
array([0, 1, 2], dtype=int8)
diff --git a/tools/refguide_check.py b/tools/refguide_check.py
index f8f601a04..baa71e39a 100644
--- a/tools/refguide_check.py
+++ b/tools/refguide_check.py
@@ -133,11 +133,8 @@ RST_SKIPLIST = [
'f2py.getting-started.rst',
'arrays.nditer.cython.rst',
# See PR 17222, these should be fixed
- 'basics.byteswapping.rst',
'basics.dispatch.rst',
- 'basics.indexing.rst',
'basics.subclassing.rst',
- 'basics.types.rst',
'basics.interoperability.rst',
'misc.rst',
]