Skip to content

Commit 84016ed

Browse files
authored
Merge pull request numpy#30183 from star1327p/grammar-issues
DOC: Corrected grammatical issues in code comments
2 parents 884aec9 + b2bde8b commit 84016ed

File tree

15 files changed

+20
-20
lines changed

15 files changed

+20
-20
lines changed

doc/source/dev/depending_on_numpy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ If a package either uses the NumPy C-API directly or it uses some other tool
9292
that depends on it like Cython or Pythran, NumPy is a *build-time* dependency
9393
of the package.
9494

95-
By default, NumPy exposes a API that is backward compatible with the earliest
95+
By default, NumPy exposes an API that is backward compatible with the earliest
9696
NumPy version that supports the oldest Python version currently supported by
9797
NumPy. For example, NumPy 1.25.0 supports Python 3.9 and above; and the
9898
earliest NumPy version to support Python 3.9 was 1.19. Therefore we guarantee

numpy/_core/src/multiarray/array_converter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ array_converter_new(
9797
Py_INCREF(item->DType);
9898

9999
/*
100-
* Check whether we were passed a an int/float/complex Python scalar.
100+
* Check whether we were passed an int/float/complex Python scalar.
101101
* If not, set `descr` and clear pyscalar/scalar flags as needed.
102102
*/
103103
if (item->scalar_input && npy_mark_tmp_array_if_pyscalar(

numpy/_core/src/multiarray/array_method.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ typedef struct PyArrayMethodObject_tag {
6969

7070

7171
/*
72-
* We will sometimes have to create a ArrayMethod and allow passing it around,
72+
* We will sometimes have to create an ArrayMethod and allow passing it around,
7373
* similar to `instance.method` returning a bound method, e.g. a function like
7474
* `ufunc.resolve()` can return a bound object.
7575
* The current main purpose of the BoundArrayMethod is that it holds on to the

numpy/_core/src/multiarray/compiled_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ _linear_search(const npy_double key, const npy_double *arr, const npy_intp len,
450450

451451
/** @brief find index of a sorted array such that arr[i] <= key < arr[i + 1].
452452
*
453-
* If an starting index guess is in-range, the array values around this
453+
* If a starting index guess is in-range, the array values around this
454454
* index are first checked. This allows for repeated calls for well-ordered
455455
* keys (a very common case) to use the previous index as a very good guess.
456456
*

numpy/_core/src/multiarray/nditer_pywrap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ NpyIter_NestedIters(PyObject *NPY_UNUSED(self),
916916
}
917917
if (!PyTuple_Check(item) && !PyList_Check(item)) {
918918
PyErr_SetString(PyExc_ValueError,
919-
"Each item in axes must be a an integer tuple");
919+
"Each item in axes must be an integer tuple");
920920
Py_DECREF(item);
921921
return NULL;
922922
}

numpy/_core/src/multiarray/textreading/rows.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ create_conv_funcs(
156156
* returned array can differ for strings.
157157
* @param homogeneous Whether the datatype of the array is not homogeneous,
158158
* i.e. not structured. In this case the number of columns has to be
159-
* discovered an the returned array will be 2-dimensional rather than
159+
* discovered and the returned array will be 2-dimensional rather than
160160
* 1-dimensional.
161161
*
162162
* @returns Returns the result as an array object or NULL on error. The result

numpy/_core/tests/test_dtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def test_field_order_equality(self):
209209
'formats': ['i4', 'f4'],
210210
'offsets': [4, 0]})
211211
assert_equal(x == y, False)
212-
# This is an safe cast (not equiv) due to the different names:
212+
# This is a safe cast (not equiv) due to the different names:
213213
assert np.can_cast(x, y, casting="safe")
214214

215215
@pytest.mark.parametrize(

numpy/distutils/pathccompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class PathScaleCCompiler(UnixCCompiler):
44

55
"""
6-
PathScale compiler compatible with an gcc built Python.
6+
PathScale compiler compatible with a gcc built Python.
77
"""
88

99
compiler_type = 'pathcc'

numpy/lib/_function_base_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4731,7 +4731,7 @@ def _quantile(
47314731
if weights is None:
47324732
# --- Computation of indexes
47334733
# Index where to find the value in the sorted array.
4734-
# Virtual because it is a floating point value, not an valid index.
4734+
# Virtual because it is a floating point value, not a valid index.
47354735
# The nearest neighbours are used for interpolation
47364736
try:
47374737
method_props = _QuantileMethods[method]

numpy/lib/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class NDArrayOperatorsMixin:
7070
but that should support arithmetic and numpy universal functions like
7171
arrays as described in :external+neps:doc:`nep-0013-ufunc-overrides`.
7272
73-
As an trivial example, consider this implementation of an ``ArrayLike``
73+
As a trivial example, consider this implementation of an ``ArrayLike``
7474
class that simply wraps a NumPy array and ensures that the result of any
7575
arithmetic operation is also an ``ArrayLike`` object:
7676

0 commit comments

Comments
 (0)