Skip to content

Commit aecdb9f

Browse files
committed
DOC: Add links to the __class_getitem__ docs
1 parent 53b84fd commit aecdb9f

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

doc/source/reference/arrays.dtypes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,3 +562,10 @@ The following methods implement the pickle protocol:
562562

563563
dtype.__reduce__
564564
dtype.__setstate__
565+
566+
Utility method for typing:
567+
568+
.. autosummary::
569+
:toctree: generated/
570+
571+
dtype.__class_getitem__

doc/source/reference/arrays.ndarray.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,3 +621,10 @@ String representations:
621621

622622
ndarray.__str__
623623
ndarray.__repr__
624+
625+
Utility method for typing:
626+
627+
.. autosummary::
628+
:toctree: generated/
629+
630+
ndarray.__class_getitem__

doc/source/reference/arrays.scalars.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ Inexact types
196196
``f16`` prints as ``0.1`` because it is as close to that value as possible,
197197
whereas the other types do not as they have more precision and therefore have
198198
closer values.
199-
199+
200200
Conversely, floating-point scalars of different precisions which approximate
201201
the same decimal value may compare unequal despite printing identically:
202-
202+
203203
>>> f16 = np.float16("0.1")
204204
>>> f32 = np.float32("0.1")
205205
>>> f64 = np.float64("0.1")
@@ -498,6 +498,13 @@ The exceptions to the above rules are given below:
498498
generic.__setstate__
499499
generic.setflags
500500

501+
Utility method for typing:
502+
503+
.. autosummary::
504+
:toctree: generated/
505+
506+
number.__class_getitem__
507+
501508

502509
Defining new types
503510
==================

0 commit comments

Comments
 (0)