diff options
author | Ben Nathanson <github@bigriver.xyz> | 2020-08-05 07:31:27 -0400 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2020-09-07 11:39:13 +0300 |
commit | 181446848f1d26bd387e4606de588980144ab91c (patch) | |
tree | 3afc2a2b99deda34d13aa2d90b0e58d6fc3ae9f7 | |
parent | 4d4ba091492cbe149210447c580039c744e4d5b9 (diff) | |
download | numpy-181446848f1d26bd387e4606de588980144ab91c.tar.gz |
DOC: 4th try: Avoid unwanted doctest on PR #14979
-rw-r--r-- | doc/source/glossary.rst | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/doc/source/glossary.rst b/doc/source/glossary.rst index 776701814..a1822b6e7 100644 --- a/doc/source/glossary.rst +++ b/doc/source/glossary.rst @@ -37,16 +37,13 @@ Glossary It can be used at most once: - .. doctest:: - :skipif: True + >>> a[0,...,0,...].shape + --------------------------------------------------------------------------- + IndexError Traceback (most recent call last) + <ipython-input-45-e12b83e31ec3> in <module> + ----> 1 a[0,...,0,...].shape - >>> a[0,...,0,...].shape - --------------------------------------------------------------------------- - IndexError Traceback (most recent call last) - <ipython-input-45-e12b83e31ec3> in <module> - ----> 1 a[0,...,0,...].shape - - IndexError: an index can only have a single ellipsis ('...') + IndexError: an index can only have a single ellipsis ('...') For details, see :doc:`Indexing. <reference/arrays.indexing>` @@ -63,7 +60,7 @@ Glossary axis: >>> a = np.arange(24).reshape(2,3,4) - a + >>> a array([[[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]], @@ -189,7 +186,7 @@ Glossary higher-dimensional vectors as replications of row-by-column building blocks, as in this three-dimensional vector: - >>> a = np.arange(12).reshape(2,2,3) + >>> a = np.arange(12).reshape(2,2,3) >>> a array([[[ 0, 1, 2], [ 3, 4, 5]], @@ -368,16 +365,17 @@ Glossary array, which has an internal boolean array indicating invalid entries. Operations with masked arrays ignore these entries. :: - >>> a = np.ma.masked_array([np.nan, 2, np.nan], [True, False, True]) - >>> a - masked_array(data = [-- 2.0 --], - mask = [ True False True], - fill_value = 1e+20) + >>> a = np.ma.masked_array([np.nan, 2, np.nan], [True, False, True]) + >>> a + masked_array(data=[--, 2.0, --], + mask=[ True, False, True], + fill_value=1e+20) + >>> a + [1, 2, 3] - masked_array(data = [-- 4.0 --], - mask = [ True False True], - fill_value = 1e+20) + masked_array(data=[--, 4.0, --], + mask=[ True, False, True], + fill_value=1e+20) For details, see :doc:`Masked arrays. <reference/maskedarray>` |