summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2022-01-13 09:03:17 -0700
committerGitHub <noreply@github.com>2022-01-13 09:03:17 -0700
commitc6d95f57bff1ae390b3539bd46f1c74695b861eb (patch)
tree97539532377c89f6dd8468c82b7501f0bc8cde54 /numpy/core
parent5fee4748117e752c42ee489810f272b3e65dffd3 (diff)
parent58dbe260a2e41c31f1ab03e1abdb1f01da4c1edc (diff)
downloadnumpy-c6d95f57bff1ae390b3539bd46f1c74695b861eb.tar.gz
Merge pull request #20811 from DimitriPapadopoulos/repeated
MAINT, DOC: discard repeated words
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/_add_newdocs.py2
-rw-r--r--numpy/core/numeric.py2
-rw-r--r--numpy/core/src/multiarray/array_coercion.c4
-rw-r--r--numpy/core/src/multiarray/common.c4
-rw-r--r--numpy/core/src/multiarray/convert_datatype.c2
-rw-r--r--numpy/core/src/multiarray/ctors.c4
-rw-r--r--numpy/core/src/multiarray/dtype_transfer.c4
-rw-r--r--numpy/core/src/multiarray/nditer_constr.c2
-rw-r--r--numpy/core/src/npymath/npy_math_complex.c.src2
-rw-r--r--numpy/core/src/umath/dispatching.c2
-rw-r--r--numpy/core/src/umath/ufunc_type_resolution.c2
-rw-r--r--numpy/core/tests/test_indexing.py2
12 files changed, 16 insertions, 16 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index a800143a8..7081f9a59 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -5253,7 +5253,7 @@ add_newdoc('numpy.core', 'ufunc', ('accumulate',
dtype : data-type code, optional
The data-type used to represent the intermediate results. Defaults
to the data-type of the output array if such is provided, or the
- the data-type of the input array if no output array is provided.
+ data-type of the input array if no output array is provided.
out : ndarray, None, or tuple of ndarray and None, optional
A location into which the result is stored. If not provided or None,
a freshly-allocated array is returned. For consistency with
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 014fa0a39..3e9b6c414 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -136,7 +136,7 @@ def zeros_like(a, dtype=None, order='K', subok=True, shape=None):
"""
res = empty_like(a, dtype=dtype, order=order, subok=subok, shape=shape)
- # needed instead of a 0 to get same result as zeros for for string dtypes
+ # needed instead of a 0 to get same result as zeros for string dtypes
z = zeros(1, dtype=res.dtype)
multiarray.copyto(res, z, casting='unsafe')
return res
diff --git a/numpy/core/src/multiarray/array_coercion.c b/numpy/core/src/multiarray/array_coercion.c
index 2598e4bde..ff77d6883 100644
--- a/numpy/core/src/multiarray/array_coercion.c
+++ b/numpy/core/src/multiarray/array_coercion.c
@@ -67,8 +67,8 @@
*
* The code here avoid multiple conversion of array-like objects (including
* sequences). These objects are cached after conversion, which will require
- * additional memory, but can drastically speed up coercion from from array
- * like objects.
+ * additional memory, but can drastically speed up coercion from array like
+ * objects.
*/
diff --git a/numpy/core/src/multiarray/common.c b/numpy/core/src/multiarray/common.c
index aa95d285a..8264f83b2 100644
--- a/numpy/core/src/multiarray/common.c
+++ b/numpy/core/src/multiarray/common.c
@@ -108,8 +108,8 @@ PyArray_DTypeFromObjectStringDiscovery(
/*
* This function is now identical to the new PyArray_DiscoverDTypeAndShape
- * but only returns the the dtype. It should in most cases be slowly phased
- * out. (Which may need some refactoring to PyArray_FromAny to make it simpler)
+ * but only returns the dtype. It should in most cases be slowly phased out.
+ * (Which may need some refactoring to PyArray_FromAny to make it simpler)
*/
NPY_NO_EXPORT int
PyArray_DTypeFromObject(PyObject *obj, int maxdims, PyArray_Descr **out_dtype)
diff --git a/numpy/core/src/multiarray/convert_datatype.c b/numpy/core/src/multiarray/convert_datatype.c
index b21fc3cfa..09a92b33c 100644
--- a/numpy/core/src/multiarray/convert_datatype.c
+++ b/numpy/core/src/multiarray/convert_datatype.c
@@ -3656,7 +3656,7 @@ PyArray_GetObjectToGenericCastingImpl(void)
-/* Any object object is simple (could even use the default) */
+/* Any object is simple (could even use the default) */
static NPY_CASTING
any_to_object_resolve_descriptors(
PyArrayMethodObject *NPY_UNUSED(self),
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index 25eb91977..17a49091a 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -1637,8 +1637,8 @@ PyArray_FromAny(PyObject *op, PyArray_Descr *newtype, int min_depth,
* Thus, we check if there is an array included, in that case we
* give a FutureWarning.
* When the warning is removed, PyArray_Pack will have to ensure
- * that that it does not append the dimensions when creating the
- * subarrays to assign `arr[0] = obj[0]`.
+ * that it does not append the dimensions when creating the subarrays
+ * to assign `arr[0] = obj[0]`.
*/
int includes_array = 0;
if (cache != NULL) {
diff --git a/numpy/core/src/multiarray/dtype_transfer.c b/numpy/core/src/multiarray/dtype_transfer.c
index 4877f8dfa..b0db94817 100644
--- a/numpy/core/src/multiarray/dtype_transfer.c
+++ b/numpy/core/src/multiarray/dtype_transfer.c
@@ -3393,8 +3393,8 @@ wrap_aligned_transferfunction(
* For casts between two dtypes with the same type (within DType casts)
* it also wraps the `copyswapn` function.
*
- * This function is called called from `ArrayMethod.get_loop()` when a
- * specialized cast function is missing.
+ * This function is called from `ArrayMethod.get_loop()` when a specialized
+ * cast function is missing.
*
* In general, the legacy cast functions do not support unaligned access,
* so an ArrayMethod using this must signal that. In a few places we do
diff --git a/numpy/core/src/multiarray/nditer_constr.c b/numpy/core/src/multiarray/nditer_constr.c
index bf32e1f6b..0b9717ade 100644
--- a/numpy/core/src/multiarray/nditer_constr.c
+++ b/numpy/core/src/multiarray/nditer_constr.c
@@ -992,7 +992,7 @@ npyiter_check_per_op_flags(npy_uint32 op_flags, npyiter_opitflags *op_itflags)
}
/*
- * Prepares a a constructor operand. Assumes a reference to 'op'
+ * Prepares a constructor operand. Assumes a reference to 'op'
* is owned, and that 'op' may be replaced. Fills in 'op_dataptr',
* 'op_dtype', and may modify 'op_itflags'.
*
diff --git a/numpy/core/src/npymath/npy_math_complex.c.src b/numpy/core/src/npymath/npy_math_complex.c.src
index 8c432e483..ce2772273 100644
--- a/numpy/core/src/npymath/npy_math_complex.c.src
+++ b/numpy/core/src/npymath/npy_math_complex.c.src
@@ -1696,7 +1696,7 @@ npy_catanh@c@(@ctype@ z)
if (ax < SQRT_3_EPSILON / 2 && ay < SQRT_3_EPSILON / 2) {
/*
* z = 0 was filtered out above. All other cases must raise
- * inexact, but this is the only only that needs to do it
+ * inexact, but this is the only one that needs to do it
* explicitly.
*/
raise_inexact();
diff --git a/numpy/core/src/umath/dispatching.c b/numpy/core/src/umath/dispatching.c
index 81d47a0e1..6f541340e 100644
--- a/numpy/core/src/umath/dispatching.c
+++ b/numpy/core/src/umath/dispatching.c
@@ -78,7 +78,7 @@ NPY_NO_EXPORT int
PyUFunc_AddLoop(PyUFuncObject *ufunc, PyObject *info, int ignore_duplicate)
{
/*
- * Validate the info object, this should likely move to to a different
+ * Validate the info object, this should likely move to a different
* entry-point in the future (and is mostly unnecessary currently).
*/
if (!PyTuple_CheckExact(info) || PyTuple_GET_SIZE(info) != 2) {
diff --git a/numpy/core/src/umath/ufunc_type_resolution.c b/numpy/core/src/umath/ufunc_type_resolution.c
index 90846ca55..a7df09b8f 100644
--- a/numpy/core/src/umath/ufunc_type_resolution.c
+++ b/numpy/core/src/umath/ufunc_type_resolution.c
@@ -416,7 +416,7 @@ PyUFunc_SimpleBinaryComparisonTypeResolver(PyUFuncObject *ufunc,
}
}
else {
- /* Usually a failure, but let the the default version handle it */
+ /* Usually a failure, but let the default version handle it */
return PyUFunc_DefaultTypeResolver(ufunc, casting,
operands, type_tup, out_dtypes);
}
diff --git a/numpy/core/tests/test_indexing.py b/numpy/core/tests/test_indexing.py
index 1c2253856..ff999a7b9 100644
--- a/numpy/core/tests/test_indexing.py
+++ b/numpy/core/tests/test_indexing.py
@@ -1332,7 +1332,7 @@ class TestBooleanIndexing:
class TestArrayToIndexDeprecation:
- """Creating an an index from array not 0-D is an error.
+ """Creating an index from array not 0-D is an error.
"""
def test_array_to_index_error(self):