8000 MAINT, DOC: discard repeated words · rjeb/numpy@58dbe26 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58dbe26

Browse files
MAINT, DOC: discard repeated words
1 parent 813a0c1 commit 58dbe26
< A3E2 span class="prc-TooltipV2-Tooltip-cYMVY" data-direction="se" aria-hidden="true" id=":R12plab:">Collapse file tree

35 files changed

+43
-44
lines changed

doc/source/dev/gitwash/development_setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Look it over
112112
- the ``main`` branch you just cloned on your own machine
113113
- the ``main`` branch from your fork on GitHub, which git named
114114
``origin`` by default
115-
- the ``main`` branch on the the main NumPy repo, which you named
115+
- the ``main`` branch on the main NumPy repo, which you named
116116
``upstream``.
117117

118118
::

doc/source/reference/c-api/iterator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ Construction and Destruction
653653
may not be repeated. The following example is how normal broadcasting
654654
applies to a 3-D array, a 2-D array, a 1-D array and a scalar.
655655
656-
**Note**: Before NumPy 1.8 ``oa_ndim == 0` was used for signalling that
656+
**Note**: Before NumPy 1.8 ``oa_ndim == 0` was used for signalling
657657
that ``op_axes`` and ``itershape`` are unused. This is deprecated and
658658
should be replaced with -1. Better backward compatibility may be
659659
achieved by using :c:func:`NpyIter_MultiNew` for this case.

doc/source/reference/c-api/ufunc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Functions
171171
`numpy.dtype.num` (built-in only) that the corresponding
172172
function in the ``func`` array accepts. For instance, for a comparison
173173
ufunc with three ``ntypes``, two ``nin`` and one ``nout``, where the
174-
first function accepts `numpy.int32` and the the second
174+
first function accepts `numpy.int32` and the second
175175
`numpy.int64`, with both returning `numpy.bool_`, ``types`` would
176176
be ``(char[]) {5, 5, 0, 7, 7, 0}`` since ``NPY_INT32`` is 5,
177177
``NPY_INT64`` is 7, and ``NPY_BOOL`` is 0.

doc/source/reference/random/parallel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ streams.
2828

2929
`~SeedSequence` avoids these problems by using successions of integer hashes
3030
with good `avalanche properties`_ to ensure that flipping any bit in the input
31-
input has about a 50% chance of flipping any bit in the output. Two input seeds
32-
that are very close to each other will produce initial states that are very far
31+
has about a 50% chance of flipping any bit in the output. Two input seeds that
32+
are very close to each other will produce initial states that are very far
3333
from each other (with very high probability). It is also constructed in such
3434
a way that you can provide arbitrary-sized integers or lists of integers.
3535
`~SeedSequence` will take all of the bits that you provide and mix them

doc/source/reference/swig.interface-file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ Routines
904904

905905
* ``PyArrayObject* ary``, a NumPy array.
906906

907-
Require the given ``PyArrayObject`` to to be Fortran ordered. If
907+
Require the given ``PyArrayObject`` to be Fortran ordered. If
908908
the ``PyArrayObject`` is already Fortran ordered, do nothing.
909909
Else, set the Fortran ordering flag and recompute the strides.
910910

doc/source/user/basics.subclassing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ which inputs and outputs it converted. Hence, e.g.,
523523
>>> a.info
524524
{'inputs': [0, 1], 'outputs': [0]}
525525

526-
Note that another approach would be to to use ``getattr(ufunc,
526+
Note that another approach would be to use ``getattr(ufunc,
527527
methods)(*inputs, **kwargs)`` instead of the ``super`` call. For this example,
528528
the result would be identical, but there is a difference if another operand
529529
also defines ``__array_ufunc__``. E.g., lets assume that we evalulate

doc/source/user/building.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ intended host and not the build system, set::
341341

342342
where ``${ARCH_TRIPLET}`` is an architecture-dependent suffix appropriate for
343343
the host architecture. (This should be the name of a ``_sysconfigdata`` file,
344-
without the ``.py`` extension, found in in the host Python library directory.)
344+
without the ``.py`` extension, found in the host Python library directory.)
345345

346346
When using external linear algebra libraries, include and library directories
347347
should be provided for the desired libraries in ``site.cfg`` as described

doc/source/user/c-info.how-to-extend.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Defining functions
111111
========= F42D =========
112112
113113
The second argument passed in to the Py_InitModule function is a
114-
structure that makes it easy to to define functions in the module. In
114+
structure that makes it easy to define functions in the module. In
115115
the example given above, the mymethods structure would have been
116116
defined earlier in the file (usually right before the init{name}
117117
subroutine) to:

numpy/core/_add_newdocs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5253,7 +5253,7 @@
52535253
dtype : data-type code, optional
52545254
The data-type used to represent the intermediate results. Defaults
52555255
to the data-type of the output array if such is provided, or the
5256-
the data-type of the input array if no output array is provided.
5256+
data-type of the input array if no output array is provided.
52575257
out : ndarray, None, or tuple of ndarray and None, optional
52585258
A location into which the result is stored. If not provided or None,
52595259
a freshly-allocated array is returned. For consistency with

numpy/core/numeric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def zeros_like(a, dtype=None, order='K', subok=True, shape=None):
136136
137137
"""
138138
res = empty_like(a, dtype=dtype, order=order, subok=subok, shape=shape)
139-
# needed instead of a 0 to get same result as zeros for for string dtypes
139+
# needed instead of a 0 to get same result as zeros for string dtypes
140140
z = zeros(1, dtype=res.dtype)
141141
multiarray.copyto(res, z, casting='unsafe')
142142
return res

numpy/core/src/multiarray/array_coercion.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
*
6868
* The code here avoid multiple conversion of array-like objects (including
6969
* sequences). These objects are cached after conversion, which will require
70-
* additional memory, but can drastically speed up coercion from from array
71-
* like objects.
70+
* additional memory, but can drastically speed up coercion from array like
71+
* objects.
7272
*/
7373

7474

numpy/core/src/multiarray/common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ PyArray_DTypeFromObjectStringDiscovery(
108108

109109
/*
110110
* This function is now identical to the new PyArray_DiscoverDTypeAndShape
111-
* but only returns the the dtype. It should in most cases be slowly phased
112-
* out. (Which may need some refactoring to PyArray_FromAny to make it simpler)
111+
* but only returns the dtype. It should in most cases be slowly phased out.
112+
* (Which may need some refactoring to PyArray_FromAny to make it simpler)
113113
*/
114114
NPY_NO_EXPORT int
115115
PyArray_DTypeFromObject(PyObject *obj, int maxdims, PyArray_Descr **out_dtype)

numpy/core/src/multiarray/convert_datatype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3656,7 +3656,7 @@ PyArray_GetObjectToGenericCastingImpl(void)
36563656

36573657

36583658

3659-
/* Any object object is simple (could even use the default) */
3659+
/* Any object is simple (could even use the default) */
36603660
static NPY_CASTING
36613661
any_to_object_resolve_descriptors(
36623662
PyArrayMethodObject *NPY_UNUSED(self),

numpy/core/src/multiarray/ctors.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,8 +1637,8 @@ PyArray_FromAny(PyObject *op, PyArray_Descr *newtype, int min_depth,
16371637
* Thus, we check if there is an array included, in that case we
16381638
* give a FutureWarning.
16391639
* When the warning is removed, PyArray_Pack will have to ensure
1640-
* that that it does not append the dimensions when creating the
1641-
* subarrays to assign `arr[0] = obj[0]`.
1640+
* that it does not append the dimensions when creating the subarrays
1641+
* to assign `arr[0] = obj[0]`.
16421642
*/
16431643
int includes_array = 0;
16441644
if (cache != NULL) {

numpy/core/src/multiarray/dtype_transfer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3393,8 +3393,8 @@ wrap_aligned_transferfunction(
33933393
* For casts between two dtypes with the same type (within DType casts)
33943394
* it also wraps the `copyswapn` function.
33953395
*
3396-
* This function is called called from `ArrayMethod.get_loop()` when a
3397-
* specialized cast function is missing.
3396+
* This function is called from `ArrayMethod.get_loop()` when a specialized
3397+
* cast function is missing.
33983398
*
33993399
* In general, the legacy cast functions do not support unaligned access,
34003400
* so an ArrayMethod using this must signal that. In a few places we do

numpy/core/src/multiarray/nditer_constr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ npyiter_check_per_op_flags(npy_uint32 op_flags, npyiter_opitflags *op_itflags)
992992
}
993993

994994
/*
995-
* Prepares a a constructor operand. Assumes a reference to 'op'
995+
* Prepares a constructor operand. Assumes a reference to 'op'
996996
* is owned, and that 'op' may be replaced. Fills in 'op_dataptr',
997997
* 'op_dtype', and may modify 'op_itflags'.
998998
*

numpy/core/src/npymath/npy_math_complex.c.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ npy_catanh@c@(@ctype@ z)
16961696
if (ax < SQRT_3_EPSILON / 2 && ay < SQRT_3_EPSILON / 2) {
16971697
/*
16981698
* z = 0 was filtered out above. All other cases must raise
1699-
* inexact, but this is the only only that needs to do it
1699+
* inexact, but this is the only one that needs to do it
17001700
* explicitly.
17011701
*/
17021702
raise_inexact();

numpy/core/src/umath/dispatching.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ NPY_NO_EXPORT int
7878
PyUFunc_AddLoop(PyUFuncObject *ufunc, PyObject *info, int ignore_duplicate)
7979
{
8080
/*
81-
* Validate the info object, this should likely move to to a different
81+
* Validate the info object, this should likely move to a different
8282
* entry-point in the future (and is mostly unnecessary currently).
8383
*/
8484
if (!PyTuple_CheckExact(info) || PyTuple_GET_SIZE(info) != 2) {

numpy/core/src/umath/ufunc_type_resolution.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ PyUFunc_SimpleBinaryComparisonTypeResolver(PyUFuncObject *ufunc,
416416
}
417417
}
418418
else {
419-
/* Usually a failure, but let the the default version handle it */
419+
/* Usually a failure, but let the default version handle it */
420420
return PyUFunc_DefaultTypeResolver(ufunc, casting,
421421
operands, type_tup, out_dtypes);
422422
}

numpy/core/tests/test_indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ def test_boolean_indexing_fast_path(self):
13321332

13331333

13341334
class TestArrayToIndexDeprecation:
1335-
"""Creating an an index from array not 0-D is an error.
1335+
"""Creating an index from array not 0-D is an error.
13361336
13371337
"""
13381338
def test_array_to_index_error(self):

numpy/doc/ufuncs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
>>> np.add.reduce(np.arange(10).reshape(2,5),axis=1)
7676
array([10, 35])
7777
78-
**.accumulate(arr)** applies the binary operator and generates an an
78+
**.accumulate(arr)** applies the binary operator and generates an
7979
equivalently shaped array that includes the accumulated amount for each
8080
element of the array. A couple examples: ::
8181

numpy/lib/function_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3551,8 +3551,8 @@ def sinc(x):
35513551
Parameters
35523552
----------
35533553
x : ndarray
3554-
Array (possibly multi-dimensional) of values for which to to
3555-
calculate ``sinc(x)``.
3554+
Array (possibly multi-dimensional) of values for which to calculate
3555+
``sinc(x)``.
35563556
35573557
Returns
35583558
-------

numpy/lib/histograms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,8 @@ def histogram_bin_edges(a, bins=10, range=None, weights=None):
506506
with non-normal datasets.
507507
508508
'scott'
509-
Less robust estimator that that takes into account data
510-
variability and data size.
509+
Less robust estimator that takes into account data variability
510+
and data size.
511511
512512
'stone'
513513
Estimator based on leave-one-out cross-validation estimate of

numpy/lib/nanfunctions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,8 @@ def _divide_by_count(a, b, out=None):
188188
"""
189189
Compute a/b ignoring invalid results. If `a` is an array the division
190190
is done in place. If `a` is a scalar, then its type is preserved in the
191-
output. If out is None, then then a is used instead so that the
192-
division is in place. Note that this is only called with `a` an inexact
193-
type.
191+
output. If out is None, then a is used instead so that the division
192+
is in place. Note that this is only called with `a` an inexact type.
194193
195194
Parameters
196195
----------

numpy/polynomial/chebyshev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ def chebval(x, c, tensor=True):
11191119
If `x` is a list or tuple, it is converted to an ndarray, otherwise
11201120
it is left unchanged and treated as a scalar. In either case, `x`
11211121
or its elements must support addition and multiplication with
1122-
with themselves and with the elements of `c`.
1122+
themselves and with the elements of `c`.
11231123
c : array_like
11241124
Array of coefficients ordered so that the coefficients for terms of
11251125
degree n are contained in c[n]. If `c` is multidimensional the

numpy/polynomial/hermite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ def hermval(x, c, tensor=True):
827827
If `x` is a list or tuple, it is converted to an ndarray, otherwise
828828
it is left unchanged and treated as a scalar. In either case, `x`
829829
or its elements must support addition and multiplication with
830-
with themselves and with the elements of `c`.
830+
themselves and with the elements of `c`.
831831
c : array_like
832832
Array of coefficients ordered so that the coefficients for terms of
833833
degree n are contained in c[n]. If `c` is multidimensional the

numpy/polynomial/laguerre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ def lagval(x, c, tensor=True):
826826
If `x` is a list or tuple, it is converted to an ndarray, otherwise
827827
it is left unchanged and treated as a scalar. In either case, `x`
828828
or its elements must support addition and multiplication with
829-
with themselves and with the elements of `c`.
829+
themselves and with the elements of `c`.
830830
c : array_like
831831
Array of coefficients ordered so that the coefficients for terms of
832832
degree n are contained in c[n]. If `c` is multidimensional the

numpy/polynomial/legendre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ def legval(x, c, tensor=True):
857857
If `x` is a list or tuple, it is converted to an ndarray, otherwise
858858
it is left unchanged and treated as a scalar. In either case, `x`
859859
or its elements must support addition and multiplication with
860-
with themselves and with the elements of `c`.
860+
themselves and with the elements of `c`.
861861
c : array_like
862862
Array of coefficients ordered so that the coefficients for terms of
863863
degree n are contained in c[n]. If `c` is multidimensional the

numpy/random/_common.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ cdef object random_raw(bitgen_t *bitgen, object lock, object size, object output
6565
6666
Notes
6767
-----
68-
This method directly exposes the the raw underlying pseudo-random
68+
This method directly exposes the raw underlying pseudo-random
6969
number generator. All values are returned as unsigned 64-bit
7070
values irrespective of the number of bits produced by the PRNG.
7171

numpy/random/_examples/cython/extending.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def uniform_mean(Py_ssize_t n):
3131
random_values = np.empty(n)
3232
# Best practice is to acquire the lock whenever generating random values.
3333
# This prevents other threads from modifying the state. Acquiring the lock
34-
# is only necessary if if the GIL is also released, as in this example.
34+
# is only necessary if the GIL is also released, as in this example.
3535
with x.lock, nogil:
3636
for i in range(n):
3737
random_values[i] = rng.next_double(rng.state)

numpy/random/bit_generator.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ cdef class BitGenerator():
576576
577577
Notes
578578
-----
579-
This method directly exposes the the raw underlying pseudo-random
579+
This method directly exposes the raw underlying pseudo-random
580580
number generator. All values are returned as unsigned 64-bit
581581
values irrespective of the number of bits produced by the PRNG.
582582

numpy/random/tests/test_generator_mt19937.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2563,7 +2563,7 @@ def test_three_arg_funcs(self):
25632563
def test_jumped(config):
25642564
# Each config contains the initial seed, a number of raw steps
25652565
# the sha256 hashes of the initial and the final states' keys and
2566-
# the position of of the initial and the final state.
2566+
# the position of the initial and the final state.
25672567
# These were produced using the original C implementation.
25682568
seed = config["seed"]
25692569
steps = config["steps"]

numpy/testing/_private/parameterized.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
tl;dr: all code code is licensed under simplified BSD, unless stated otherwise.
2+
tl;dr: all code is licensed under simplified BSD, unless stated otherwise.
33
44
Unless stated otherwise in the source files, all code is copyright 2010 David
55
Wolever <david@wolever.net>. All rights reserved.

tools/swig/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ system used here, can be found in the NumPy reference guide.
1515
Testing
1616
-------
1717
The tests are a good example of what we are trying to do with numpy.i.
18-
The files related to testing are are in the test subdirectory::
18+
The files related to testing are in the test subdirectory::
1919

2020
Vector.h
2121
Vector.cxx

tools/swig/numpy.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@
524524
return success;
525525
}
526526

527-
/* Require the given PyArrayObject to to be Fortran ordered. If the
527+
/* Require the given PyArrayObject to be Fortran ordered. If the
528528
* the PyArrayObject is already Fortran ordered, do nothing. Else,
529529
* set the Fortran ordering flag and recompute the strides.
530530
*/

0 commit comments

Comments
 (0)
0