MAINT: Fix a few typos - and sometimes improve wording by DimitriPapadopoulos · Pull Request #27376 · numpy/numpy · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linux_simd.yml
2 changes: 1 addition & 1 deletion doc/release/upcoming_changes/27156.change.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NEP 50 promotion state option removed
The NEP 50 promotion state settings are now removed. They were always
meant as temporary means for testing.
A warning will be given if the environment variable is set to anything
but ``NPY_PROMOTION_STATE=weak`` wile ``_set_promotion_state``
but ``NPY_PROMOTION_STATE=weak`` while ``_set_promotion_state``
and ``_get_promotion_state`` are removed.
In case code used ``_no_nep50_warning``, a ``contextlib.nullcontext``
could be used to replace it when not available.
2 changes: 1 addition & 1 deletion doc/source/building/cross_compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ may need to pass to Meson to successfully cross compile.

One possible hiccup is that the build requires running a compiled executable in
order to determine the ``long double`` format for the host platform. This may be
an obstable, since it requires ``crossenv`` or QEMU to run the host (cross)
an obstacle, since it requires ``crossenv`` or QEMU to run the host (cross)
Python. To avoid this problem, specify the paths to the relevant directories in
your *cross file*:

Expand Down
2 changes: 1 addition & 1 deletion doc/source/user/how-to-io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,6 @@ storage.

>>> import os
>>> # list all files created in testsetup. If needed there are
>>> # convenienes in e.g. astroquery to do this more automatically
>>> # conveniences in e.g. astroquery to do this more automatically
>>> for filename in ['csv.txt', 'fixedwidth.txt', 'nan.txt', 'skip.txt', 'tabs.txt']:
... os.remove(filename)
2 changes: 1 addition & 1 deletion meson_cpu/main_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
#ifndef @P@_CPU_DISPATCHER_CONF_H_
#define @P@_CPU_DISPATCHER_CONF_H_
/// This definition is required to provides comptablity with NumPy distutils
/// This definition is required to provide comptibility with NumPy distutils

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think this is still wrong. Missed it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops... I will run codespell again at some point, it should catch this typo.

#define @P@_CPU_MESON_BUILD
/**
* @def @P@WITH_CPU_BASELINE
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/src/multiarray/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/*************************************************************************
* PEP 3118 buffer protocol
*
* Implementing PEP 3118 is somewhat convoluted because of the desirata:
* Implementing PEP 3118 is somewhat convoluted because of the requirements:
*
* - Don't add new members to ndarray or descr structs, to preserve binary
* compatibility. (Also, adding the items is actually not very useful,
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/tests/test_custom_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_possible_and_impossible_reduce(self):
# For reductions to work, the first and last operand must have the
# same dtype. For this parametric DType that is not necessarily true.
a = self._get_array(2.)
# Addition reductin works (as of writing requires to pass initial
# Addition reduction works (as of writing requires to pass initial
# because setting a scaled-float from the default `0` fails).
res = np.add.reduce(a, initial=0.)
assert res == a.astype(np.float64).sum()
Expand Down
4 changes: 2 additions & 2 deletions numpy/_core/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -2179,9 +2179,9 @@ class TestArrayComparisons:
)
def test_array_equal_equal_nan(self, bx, by, equal_nan, expected):
"""
This test array_equal for a few combinaison:
This test array_equal for a few combinations:

- are the two inputs the same object or not (same object many not
- are the two inputs the same object or not (same object may not
be equal if contains NaNs)
- Whether we should consider or not, NaNs, being equal.

Expand Down
4 changes: 2 additions & 2 deletions numpy/_core/tests/test_ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2544,8 +2544,8 @@ def test_reducelike_out_promotes(self):
assert single_res != res

def test_reducelike_output_needs_identical_cast(self):
# Checks the case where the we have a simple byte-swap works, maily
# tests that this is not rejected directly.
# Checks the case where a simple byte-swap works, mainly tests that
# this is not rejected directly.
# (interesting because we require descriptor identity in reducelikes).
arr = np.ones(20, dtype="f8")
out = np.empty((), dtype=arr.dtype.newbyteorder())
Expand Down
2 changes: 1 addition & 1 deletion numpy/f2py/tests/test_array_from_pyobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def is_intent_exact(self, *names):

# 32 bit system malloc typically does not provide the alignment required by
# 16 byte long double types this means the inout intent cannot be satisfied
# and several tests fail as the alignment flag can be randomly true or fals
# and several tests fail as the alignment flag can be randomly true or false
# when numpy gains an aligned allocator the tests could be enabled again
#
# Furthermore, on macOS ARM64, LONGDOUBLE is an alias for DOUBLE.
Expand Down
2 changes: 1 addition & 1 deletion numpy/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
del PytestTester

def __getattr__(attr):
# Warn for reprecated attributes
# Warn for deprecated/removed aliases
import math
import warnings

Expand Down
2 changes: 1 addition & 1 deletion numpy/lib/recfunctions.py