Skip to content

Commit 3df1665

Browse files
DOC: Fix minor issues in arrays.promotion.rst (numpy#27403)
1 parent c283608 commit 3df1665

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/source/reference/arrays.promotion.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Note the following specific rules and observations:
149149

150150
1. When a Python ``float`` or ``complex`` interacts with a NumPy integer
151151
the result will be ``float64`` or ``complex128`` (yellow border).
152-
NumPy booleans will also be cast to the default integer.[#default-int]
152+
NumPy booleans will also be cast to the default integer [#default-int]_.
153153
This is not relevant when additionally NumPy floating point values are
154154
involved.
155155
2. The precision is drawn such that ``float16 < int16 < uint16`` because
@@ -172,7 +172,7 @@ would give.
172172

173173
Behavior of ``sum`` and ``prod``
174174
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175-
**``np.sum`` and ``np.prod``:** Will always return the default integer type
175+
``np.sum`` and ``np.prod`` will always return the default integer type
176176
when summing over integer values (or booleans). This is usually an ``int64``.
177177
The reason for this is that integer summations are otherwise very likely
178178
to overflow and give confusing results.
@@ -247,7 +247,7 @@ could drastically slow down evaluation.
247247

248248

249249
.. [#hist-reasons] To a large degree, this may just be for choices made early
250-
on in NumPy's predecessors. For more details, see `NEP 50 <NEP50>`.
250+
on in NumPy's predecessors. For more details, see :ref:`NEP 50 <NEP50>`.
251251
252252
.. [#NEP50] See also :ref:`NEP 50 <NEP50>` which changed the rules for
253253
NumPy 2.0. Previous versions of NumPy would sometimes return higher

0 commit comments

Comments
 (0)