diff options
author | Takanori H <takanori17h@gmail.com> | 2020-07-31 15:01:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-31 09:01:25 +0300 |
commit | 2d39e7fc7b9269e27270e637a5aca9a816dd58b0 (patch) | |
tree | f238fa0385e08a2502e9c1a0c51be5cb4796996c | |
parent | 210e5424c553e2d18b2be84f40c374b5d6a2e557 (diff) | |
download | numpy-2d39e7fc7b9269e27270e637a5aca9a816dd58b0.tar.gz |
DOC: Remove the links for ``True`` and ``False`` (#16887)
* DOC: use :py:data:True and :py:data:False
-rw-r--r-- | doc/source/reference/arrays.indexing.rst | 8 | ||||
-rw-r--r-- | doc/source/reference/arrays.scalars.rst | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/source/reference/arrays.indexing.rst b/doc/source/reference/arrays.indexing.rst index 56b99f272..3e600b7c4 100644 --- a/doc/source/reference/arrays.indexing.rst +++ b/doc/source/reference/arrays.indexing.rst @@ -377,15 +377,15 @@ type, such as may be returned from comparison operators. A single boolean index array is practically identical to ``x[obj.nonzero()]`` where, as described above, :meth:`obj.nonzero() <ndarray.nonzero>` returns a tuple (of length :attr:`obj.ndim <ndarray.ndim>`) of integer index -arrays showing the :const:`True` elements of *obj*. However, it is +arrays showing the :py:data:`True` elements of *obj*. However, it is faster when ``obj.shape == x.shape``. If ``obj.ndim == x.ndim``, ``x[obj]`` returns a 1-dimensional array -filled with the elements of *x* corresponding to the :const:`True` +filled with the elements of *x* corresponding to the :py:data:`True` values of *obj*. The search order will be :term:`row-major`, -C-style. If *obj* has :const:`True` values at entries that are outside +C-style. If *obj* has :py:data:`True` values at entries that are outside of the bounds of *x*, then an index error will be raised. If *obj* is -smaller than *x* it is identical to filling it with :const:`False`. +smaller than *x* it is identical to filling it with :py:data:`False`. .. admonition:: Example diff --git a/doc/source/reference/arrays.scalars.rst b/doc/source/reference/arrays.scalars.rst index d27d61e2c..f57a11724 100644 --- a/doc/source/reference/arrays.scalars.rst +++ b/doc/source/reference/arrays.scalars.rst @@ -24,11 +24,11 @@ mixing scalar and array operations. Array scalars live in a hierarchy (see the Figure below) of data types. They can be detected using the hierarchy: For example, -``isinstance(val, np.generic)`` will return :const:`True` if *val* is +``isinstance(val, np.generic)`` will return :py:data:`True` if *val* is an array scalar object. Alternatively, what kind of array scalar is present can be determined using other members of the data type hierarchy. Thus, for example ``isinstance(val, np.complexfloating)`` -will return :const:`True` if *val* is a complex valued type, while +will return :py:data:`True` if *val* is a complex valued type, while :const:`isinstance(val, np.flexible)` will return true if *val* is one of the flexible itemsize array types (:class:`string`, :class:`unicode`, :class:`void`). |