Skip to content

Commit

Permalink
DOC: discard repeated words in NEPs (#20816)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Jan 13, 2022
1 parent c6d95f5 commit f5e74cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/neps/nep-0022-ndarray-duck-typing-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ partial duck arrays. We've been guilty of this ourself.

At this point though, we think the best general strategy is to focus
our efforts primarily on supporting full duck arrays, and only worry
about partial duck arrays as much as we need to to make sure we don't
about partial duck arrays as much as we need to make sure we don't
accidentally rule them out for no reason.

Why focus on full duck arrays? Several reasons:
Expand Down
2 changes: 1 addition & 1 deletion doc/neps/nep-0023-backwards-compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Discussion

- `Mailing list discussion on the first version of this NEP in 2018 <https://mail.python.org/pipermail/numpy-discussion/2018-July/078432.html>`__
- `Mailing list discussion on the Dec 2020 update of this NEP <https://mail.python.org/pipermail/numpy-discussion/2020-December/081358.html>`__
- `PR with review comments on the the Dec 2020 update of this NEP <https://github.com/numpy/numpy/pull/18097>`__
- `PR with review comments on the Dec 2020 update of this NEP <https://github.com/numpy/numpy/pull/18097>`__


References and Footnotes
Expand Down
2 changes: 1 addition & 1 deletion doc/neps/nep-0041-improved-dtype-support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ cannot describe casting for such parametric datatypes implemented outside of Num
This additional functionality for supporting parametric datatypes introduces
increased complexity within NumPy itself,
and furthermore is not available to external user-defined datatypes.
In general the concerns of different datatypes are not well well-encapsulated.
In general the concerns of different datatypes are not well-encapsulated.
This burden is exacerbated by the exposure of internal C structures,
limiting the addition of new fields
(for example to support new sorting methods [new_sort]_).
Expand Down
2 changes: 1 addition & 1 deletion doc/neps/nep-0042-new-dtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ user-defined DType::
class UserDtype(dtype): ...

one can do ``np.ndarray[UserDtype]``, keeping annotations concise in
that case without introducing boilerplate in NumPy itself. For a user
that case without introducing boilerplate in NumPy itself. For a
user-defined scalar type::

class UserScalar(generic): ...
Expand Down
10 changes: 5 additions & 5 deletions doc/neps/nep-0043-extensible-ufuncs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ the inner-loop operates on.
This is necessary information for parametric dtypes since for example comparing
two strings requires knowing the length of both strings.
The ``Context`` can also hold potentially useful information such as the
the original ``ufunc``, which can be helpful when reporting errors.
original ``ufunc``, which can be helpful when reporting errors.

In principle passing in Context is not necessary, as all information could be
included in ``innerloop_data`` and set up in the ``get_loop`` function.
Expand Down Expand Up @@ -948,7 +948,7 @@ This wrapped ``ArrayMethod`` will have two additional methods:
convert this to ``float64 + float64``.

* ``wrap_outputs(Tuple[DType]: input_descr) -> Tuple[DType]`` replacing the
resolved descriptors with with the desired actual loop descriptors.
resolved descriptors with the desired actual loop descriptors.
The original ``resolve_descriptors`` function will be called between these
two calls, so that the output descriptors may not be set in the first call.
In the above example it will use the ``float64`` as returned (which might
Expand Down Expand Up @@ -987,8 +987,8 @@ A different use-case is that of a ``Unit(float64, "m")`` DType, where
the numerical type is part of the DType parameter.
This approach is possible, but will require a custom ``ArrayMethod``
which wraps existing loops.
It must also always require require two steps of dispatching
(one to the ``Unit`` DType and a second one for the numerical type).
It must also always require two steps of dispatching (one to the ``Unit``
DType and a second one for the numerical type).

Furthermore, the efficient implementation will require the ability to
fetch and reuse the inner-loop function from another ``ArrayMethod``.
Expand Down Expand Up @@ -1296,7 +1296,7 @@ of the current ufunc machinery (as well as casting).

The implementation unfortunately will require large maintenance of the
UFunc machinery, since both the actual UFunc loop calls, as well as the
the initial dispatching steps have to be modified.
initial dispatching steps have to be modified.

In general, the correct ``ArrayMethod``, also those returned by a promoter,
will be cached (or stored) inside a hashtable for efficient lookup.
Expand Down

0 comments on commit f5e74cb

Please sign in to comment.