Skip to content

Commit e791b11

Browse files
authored
Merge pull request numpy#19920 from DimitriPapadopoulos/codespell-neps
DOC: Fix typos in NEPs, found by codespell
2 parents 1372d26 + a94af84 commit e791b11

14 files changed

+22
-22
lines changed

doc/neps/nep-0010-new-iterator-ufunc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ Functions For Iteration
15451545
``npy_intp *NpyIter_GetIndexPtr(NpyIter *iter)``
15461546

15471547
This gives back a pointer to the index being tracked, or NULL
1548-
if no index is being tracked. It is only useable if one of
1548+
if no index is being tracked. It is only usable if one of
15491549
the flags ``NPY_ITER_C_INDEX`` or ``NPY_ITER_F_INDEX``
15501550
were specified during construction.
15511551

doc/neps/nep-0012-missing-data.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ before it will allow NA-masked arrays to flow through.
903903
https://docs.scipy.org/doc/numpy/reference/c-api.array.html#NPY_ARRAY_ALLOWNA
904904

905905
Code which does not follow this advice, and instead just calls PyArray_Check() to verify
906-
its an ndarray and checks some flags, will silently produce incorrect results. This style
906+
it is an ndarray and checks some flags, will silently produce incorrect results. This style
907907
of code does not provide any opportunity for numpy to say "hey, this array is special",
908908
so also is not compatible with future ideas of lazy evaluation, derived dtypes, etc.
909909

@@ -963,7 +963,7 @@ The first version to implement is the array masks, because it is
963963
the more general approach. The mask itself is an array, but since
964964
it is intended to never be directly accessible from Python, it won't
965965
be a full ndarray itself. The mask always has the same shape as
966-
the array it's attached to, so it doesn't need its own shape. For
966+
the array it is attached to, so it doesn't need its own shape. For
967967
an array with a struct dtype, however, the mask will have a different
968968
dtype than just a straight bool, so it does need its own dtype.
969969
This gives us the following additions to the PyArrayObject::

doc/neps/nep-0018-array-function-protocol.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ NEP 18 — A dispatch mechanism for NumPy's high level array functions
1515
:Updated: 2019-05-25
1616
:Resolution: https://mail.python.org/pipermail/numpy-discussion/2018-August/078493.html
1717

18-
Abstact
19-
-------
18+
Abstract
19+
--------
2020

2121
We propose the ``__array_function__`` protocol, to allow arguments of NumPy
2222
functions to define how that function operates on them. This will allow

doc/neps/nep-0020-gufunc-signature-enhancement.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ have a summary of all flags. This could possibly be stored in ``core_enabled``
112112
but specific flags indicating whether or not a gufunc uses fixed, flexible, or
113113
broadcastable dimensions.
114114

115-
With the above, the formal defition of the syntax would become [4]_::
115+
With the above, the formal definition of the syntax would become [4]_::
116116

117117
<Signature> ::= <Input arguments> "->" <Output arguments>
118118
<Input arguments> ::= <Argument list>

doc/neps/nep-0031-uarray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ NEP 18 notes that this may require maintenance of two separate APIs. However,
359359
this burden may be lessened by, for example, parametrizing all tests over
360360
``numpy.overridable`` separately via a fixture. This also has the side-effect
361361
of thoroughly testing it, unlike ``__array_function__``. We also feel that it
362-
provides an oppurtunity to separate the NumPy API contract properly from the
362+
provides an opportunity to separate the NumPy API contract properly from the
363363
implementation.
364364

365365
Benefits to end-users and mixing backends

doc/neps/nep-0035-array-creation-dispatch-with-array-function.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ libraries, preventing those libraries from using such important functionality in
209209
that context.
210210

211211
The purpose of this NEP is to address that shortcoming in a simple and
212-
straighforward way: introduce a new ``like=`` keyword argument, similar to how
212+
straightforward way: introduce a new ``like=`` keyword argument, similar to how
213213
the ``empty_like`` family of functions work. When array creation functions
214214
receive such an argument, they will trigger the ``__array_function__`` protocol,
215215
and call the downstream library's own array creation function implementation.

doc/neps/nep-0036-fair-play.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Fair play rules
126126
were designed to help external packages interact more easily with
127127
NumPy. E.g., the latter allows objects from foreign libraries to
128128
pass through NumPy. We actively encourage using any of
129-
these "officialy sanctioned" mechanisms for overriding or
129+
these "officially sanctioned" mechanisms for overriding or
130130
interacting with NumPy.
131131

132132
If these mechanisms are deemed insufficient, please start a

doc/neps/nep-0038-SIMD-optimizations.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mechanism for NumPy. There are three stages to using the mechanism:
6464
- Infrastructure is provided in the code for abstract intrinsics. The ufunc
6565
machinery will be extended using sets of these abstract intrinsics, so that
6666
a single ufunc will be expressed as a set of loops, going from a minimal to
67-
a maximal set of possibly availabe intrinsics.
67+
a maximal set of possibly available intrinsics.
6868
- At compile time, compiler macros and CPU detection are used to turn the
6969
abstract intrinsics into concrete intrinsic calls. Any intrinsics not
7070
available on the platform, either because the CPU does not support them
@@ -183,7 +183,7 @@ yet supported as a universal intrinsic, then:
183183
1. It should be added as a universal intrinsic for all platforms
184184
2. If it does not have an equivalent instruction on other platforms (e.g.
185185
``_mm512_mask_i32gather_ps`` in ``AVX512``), then no universal intrinsic
186-
should be added and a platform-specific ``ufunc`` or a short helper fuction
186+
should be added and a platform-specific ``ufunc`` or a short helper function
187187
should be written instead. If such a helper function is used, it must be
188188
wrapped with the feature macros, and a reasonable non-intrinsic fallback to
189189
be used by default.
@@ -289,7 +289,7 @@ implementing and maintaining that platform's loop code.
289289
Discussion
290290
----------
291291

292-
Most of the discussion took place on the PR `gh-15228`_ to accecpt this NEP.
292+
Most of the discussion took place on the PR `gh-15228`_ to accept this NEP.
293293
Discussion on the mailing list mentioned `VOLK`_ which was added to
294294
the section on related work. The question of maintainability also was raised
295295
both on the mailing list and in `gh-15228`_ and resolved as follows:

doc/neps/nep-0040-legacy-datatype-impl.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Thus we have data types (mainly strings) with the properties that:
8282
2. Array coercion should be able to discover the exact dtype, such as for
8383
``np.array(["str1", 12.34], dtype="S")`` where NumPy discovers the
8484
resulting dtype as ``"S5"``.
85-
(If the dtype argument is ommitted the behaviour is currently ill defined [gh-15327]_.)
85+
(If the dtype argument is omitted the behaviour is currently ill defined [gh-15327]_.)
8686
A form similar to ``dtype="S"`` is ``dtype="datetime64"`` which can
8787
discover the unit: ``np.array(["2017-02"], dtype="datetime64")``.
8888

@@ -197,7 +197,7 @@ Currently ``np.dtype`` is a Python class with its instances being the
197197
To set the actual behaviour of these instances, a prototype instance is stored
198198
globally and looked up based on the ``dtype.typenum``. The singleton is used
199199
where possible. Where required it is copied and modified, for instance to change
200-
endianess.
200+
endianness.
201201

202202
Parametric datatypes (strings, void, datetime, and timedelta) must store
203203
additional information such as string lengths, fields, or datetime units --

doc/neps/nep-0041-improved-dtype-support.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ in general, it is not safe::
284284
>>> np.can_cast(np.float64, np.dtype[mp.mpf](dps=4), casting="safe")
285285
False
286286

287-
since a float64 has a higer precision than the ``mpf`` datatype with
287+
since a float64 has a higher precision than the ``mpf`` datatype with
288288
``dps=4``.
289289

290290
Alternatively, we can say that::
@@ -765,7 +765,7 @@ Discussion
765765
See :ref:`NEP 40 <NEP40>`
766766
for a list of previous meetings and discussions.
767767

768-
Additional discussion around this specific NEP has occured on both
768+
Additional discussion around this specific NEP has occurred on both
769769
the mailing list and the pull request:
770770

771771
* `Mailing list discussion <https://mail.python.org/pipermail/numpy-discussion/2020-March/080481.html>`_

0 commit comments

Comments
 (0)