summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas van Beek <43369155+BvB93@users.noreply.github.com>2021-09-16 21:23:40 +0200
committerBas van Beek <43369155+BvB93@users.noreply.github.com>2021-09-16 21:23:40 +0200
commitaecdb9fe513bf10df704466cf138a280354e3166 (patch)
treec2b08515034b9d3877c93c291ad9c93bd5069d0d
parent53b84fd2ae939911024d6f140e8d6686158e1731 (diff)
downloadnumpy-aecdb9fe513bf10df704466cf138a280354e3166.tar.gz
DOC: Add links to the `__class_getitem__` docs
-rw-r--r--doc/source/reference/arrays.dtypes.rst7
-rw-r--r--doc/source/reference/arrays.ndarray.rst7
-rw-r--r--doc/source/reference/arrays.scalars.rst11
3 files changed, 23 insertions, 2 deletions
diff --git a/doc/source/reference/arrays.dtypes.rst b/doc/source/reference/arrays.dtypes.rst
index b5ffa1a8b..34b0d7085 100644
--- a/doc/source/reference/arrays.dtypes.rst
+++ b/doc/source/reference/arrays.dtypes.rst
@@ -562,3 +562,10 @@ The following methods implement the pickle protocol:
dtype.__reduce__
dtype.__setstate__
+
+Utility method for typing:
+
+.. autosummary::
+ :toctree: generated/
+
+ dtype.__class_getitem__
diff --git a/doc/source/reference/arrays.ndarray.rst b/doc/source/reference/arrays.ndarray.rst
index f2204752d..7831b5f2c 100644
--- a/doc/source/reference/arrays.ndarray.rst
+++ b/doc/source/reference/arrays.ndarray.rst
@@ -621,3 +621,10 @@ String representations:
ndarray.__str__
ndarray.__repr__
+
+Utility method for typing:
+
+.. autosummary::
+ :toctree: generated/
+
+ ndarray.__class_getitem__
diff --git a/doc/source/reference/arrays.scalars.rst b/doc/source/reference/arrays.scalars.rst
index abef66692..71696a01d 100644
--- a/doc/source/reference/arrays.scalars.rst
+++ b/doc/source/reference/arrays.scalars.rst
@@ -196,10 +196,10 @@ Inexact types
``f16`` prints as ``0.1`` because it is as close to that value as possible,
whereas the other types do not as they have more precision and therefore have
closer values.
-
+
Conversely, floating-point scalars of different precisions which approximate
the same decimal value may compare unequal despite printing identically:
-
+
>>> f16 = np.float16("0.1")
>>> f32 = np.float32("0.1")
>>> f64 = np.float64("0.1")
@@ -498,6 +498,13 @@ The exceptions to the above rules are given below:
generic.__setstate__
generic.setflags
+Utility method for typing:
+
+.. autosummary::
+ :toctree: generated/
+
+ number.__class_getitem__
+
Defining new types
==================