Skip to content

Commit b2e7534

Browse files
authored
DOC: various spell checks and typo fixes (numpy#21314)
* DOC: contigous -> contiguous * DOC: enlongated -> elongated * DOC: thuse -> thus * DOC: quantityt -> quantity * DOC: suppled -> supplied * DOC: intgrally -> integrally * DOC: assignnent -> assignment * DOC: homoegeneous -> homogeneous * DOC: interpereted -> interpreted * DOC: optimised -> optimized * DOC: Advantanges -> Advantages * DOC: realised -> realized * DOC: parametrizing -> parameterizing * DOC: realised -> realized * DOC: intrisics -> intrinsics * DOC: ablility -> ability * DOC: intrisic -> intrinsic * DOC: unversal -> universal * DOC: machnisms -> mechanisms * DOC: specfiy -> specify * DOC: exclution -> exclusion * DOC: optimzations -> optimizations * DOC: declrations -> declarations * DOC: auto-gernreated -> auto-generated * DOC: it highely recomaned -> it is highly recommended * DOC: exectuing -> executing * DOC: strectched -> stretched * DOC: foriegn -> foreign * DOC: indeded -> intended * DOC: multimdimensional -> multidimensional * DOC: supserseded -> superseded * DOC: generalisation -> generalization * FIX: whitespace before comma
1 parent b1b21a9 commit b2e7534

19 files changed

+81
-81
lines changed

benchmarks/benchmarks/bench_linalg.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ def setup(self, dtype):
117117
self.two_dim = np.arange(240000, dtype=dtype).reshape(400, 600)
118118
self.three_dim_small = np.arange(10000, dtype=dtype).reshape(10,100,10)
119119
self.three_dim = np.arange(24000, dtype=dtype).reshape(20, 30, 40)
120-
# non_contigous arrays
121-
self.non_contigous_dim1_small = np.arange(1, 80, 2, dtype=dtype)
122-
self.non_contigous_dim1 = np.arange(1, 4000, 2, dtype=dtype)
123-
self.non_contigous_dim2 = np.arange(1, 2400, 2, dtype=dtype).reshape(30, 40)
124-
self.non_contigous_dim3 = np.arange(1, 48000, 2, dtype=dtype).reshape(20, 30, 40)
120+
# non_contiguous arrays
121+
self.non_contiguous_dim1_small = np.arange(1, 80, 2, dtype=dtype)
122+
self.non_contiguous_dim1 = np.arange(1, 4000, 2, dtype=dtype)
123+
self.non_contiguous_dim2 = np.arange(1, 2400, 2, dtype=dtype).reshape(30, 40)
124+
self.non_contiguous_dim3 = np.arange(1, 48000, 2, dtype=dtype).reshape(20, 30, 40)
125125

126126
# outer(a,b): trigger sum_of_products_contig_stride0_outcontig_two
127127
def time_einsum_outer(self, dtype):
@@ -130,19 +130,19 @@ def time_einsum_outer(self, dtype):
130130
# multiply(a, b):trigger sum_of_products_contig_two
131131
def time_einsum_multiply(self, dtype):
132132
np.einsum("..., ...", self.two_dim_small, self.three_dim , optimize=True)
133-
133+
134134
# sum and multiply:trigger sum_of_products_contig_stride0_outstride0_two
135135
def time_einsum_sum_mul(self, dtype):
136136
np.einsum(",i...->", 300, self.three_dim_small, optimize=True)
137137

138138
# sum and multiply:trigger sum_of_products_stride0_contig_outstride0_two
139139
def time_einsum_sum_mul2(self, dtype):
140140
np.einsum("i...,->", self.three_dim_small, 300, optimize=True)
141-
141+
142142
# scalar mul: trigger sum_of_products_stride0_contig_outcontig_two
143143
def time_einsum_mul(self, dtype):
144144
np.einsum("i,->i", self.one_dim_big, 300, optimize=True)
145-
145+
146146
# trigger contig_contig_outstride0_two
147147
def time_einsum_contig_contig(self, dtype):
148148
np.einsum("ji,i->", self.two_dim, self.one_dim_small, optimize=True)
@@ -151,30 +151,30 @@ def time_einsum_contig_contig(self, dtype):
151151
def time_einsum_contig_outstride0(self, dtype):
152152
np.einsum("i->", self.one_dim_big, optimize=True)
153153

154-
# outer(a,b): non_contigous arrays
154+
# outer(a,b): non_contiguous arrays
155155
def time_einsum_noncon_outer(self, dtype):
156-
np.einsum("i,j", self.non_contigous_dim1, self.non_contigous_dim1, optimize=True)
156+
np.einsum("i,j", self.non_contiguous_dim1, self.non_contiguous_dim1, optimize=True)
157157

158-
# multiply(a, b):non_contigous arrays
158+
# multiply(a, b):non_contiguous arrays
159159
def time_einsum_noncon_multiply(self, dtype):
160-
np.einsum("..., ...", self.non_contigous_dim2, self.non_contigous_dim3 , optimize=True)
161-
162-
# sum and multiply:non_contigous arrays
160+
np.einsum("..., ...", self.non_contiguous_dim2, self.non_contiguous_dim3, optimize=True)
161+
162+
# sum and multiply:non_contiguous arrays
163163
def time_einsum_noncon_sum_mul(self, dtype):
164-
np.einsum(",i...->", 300, self.non_contigous_dim3, optimize=True)
164+
np.einsum(",i...->", 300, self.non_contiguous_dim3, optimize=True)
165165

166-
# sum and multiply:non_contigous arrays
166+
# sum and multiply:non_contiguous arrays
167167
def time_einsum_noncon_sum_mul2(self, dtype):
168-
np.einsum("i...,->", self.non_contigous_dim3, 300, optimize=True)
169-
170-
# scalar mul: non_contigous arrays
168+
np.einsum("i...,->", self.non_contiguous_dim3, 300, optimize=True)
169+
170+
# scalar mul: non_contiguous arrays
171171
def time_einsum_noncon_mul(self, dtype):
172-
np.einsum("i,->i", self.non_contigous_dim1, 300, optimize=True)
173-
174-
# contig_contig_outstride0_two: non_contigous arrays
172+
np.einsum("i,->i", self.non_contiguous_dim1, 300, optimize=True)
173+
174+
# contig_contig_outstride0_two: non_contiguous arrays
175175
def time_einsum_noncon_contig_contig(self, dtype):
176-
np.einsum("ji,i->", self.non_contigous_dim2, self.non_contigous_dim1_small, optimize=True)
176+
np.einsum("ji,i->", self.non_contiguous_dim2, self.non_contiguous_dim1_small, optimize=True)
177177

178-
# sum_of_products_contig_outstride0_one:non_contigous arrays
178+
# sum_of_products_contig_outstride0_one:non_contiguous arrays
179179
def time_einsum_noncon_contig_outstride0(self, dtype):
180-
np.einsum("i->", self.non_contigous_dim1, optimize=True)
180+
np.einsum("i->", self.non_contiguous_dim1, optimize=True)

doc/C_STYLE_GUIDE.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
The "NumPy C Style Guide" at this page has been supserseded by
2+
The "NumPy C Style Guide" at this page has been superseded by
33
"NEP 45 — C Style Guide" at https://numpy.org/neps/nep-0045-c_style_guide.html

doc/EXAMPLE_DOCSTRING.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ multivariate_normal(mean, cov[, shape])
99
Draw samples from a multivariate normal distribution.
1010

1111
The multivariate normal, multinormal or Gaussian distribution is a
12-
generalisation of the one-dimensional normal distribution to higher
12+
generalization of the one-dimensional normal distribution to higher
1313
dimensions.
1414

1515
Such a distribution is specified by its mean and covariance matrix,

doc/neps/nep-0002-warnfix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ expanded to::
7676
int foo(int * __NPY_UNUSED_TAGGEDdummy __COMP_NPY_UNUSED)
7777
7878
Thus avoiding any accidental use of the variable. The mangling is pure C, and
79-
thuse portable. The per-variable warning disabling is compiler specific.
79+
thus portable. The per-variable warning disabling is compiler specific.
8080
8181
signed/unsigned comparison
8282
--------------------------

doc/neps/nep-0009-structured_array_extensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ NEP 9 — Structured array extensions
99
1. Create with-style context that makes "named-columns" available as names in the namespace.
1010

1111
with np.columns(array):
12-
price = unit * quantityt
12+
price = unit * quantity
1313

1414

1515
2. Allow structured arrays to be sliced by their column (i.e. one additional indexing option for structured arrays) so that a[:4, 'foo':'bar'] would be allowed.

doc/neps/nep-0012-missing-data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ New functions added to the ndarray are::
428428
arr.copy(..., replacena=np.NA)
429429
Modification to the copy function which replaces NA values,
430430
either masked or with the NA bitpattern, with the 'replacena='
431-
parameter suppled. When 'replacena' isn't NA, the copied
431+
parameter supplied. When 'replacena' isn't NA, the copied
432432
array is unmasked and has the 'NA' part stripped from the
433433
parameterized dtype ('NA[f8]' becomes just 'f8').
434434

doc/neps/nep-0017-split-out-maskedarray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ how to modify code to use `maskedarray`.
6969
After two releases, `np.ma` will be removed entirely. In order to obtain
7070
`np.ma`, a user will install it via `pip install` or via their package
7171
manager. Subsequently, `importing maskedarray` on a version of NumPy that
72-
includes it intgrally will raise an `ImportError`.
72+
includes it integrally will raise an `ImportError`.
7373

7474
Documentation
7575
`````````````

doc/neps/nep-0024-missing-data-2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ is obvious in the NA case::
193193
>>> na_arr
194194
array([1., 2., NA], dtype='NA[<f8]')
195195

196-
Direct assignnent in the masked case is magic and confusing, and so happens only
196+
Direct assignment in the masked case is magic and confusing, and so happens only
197197
via the mask::
198198

199199
>>> masked_array = np.array([1.0, 2.0, 7.0], masked=True)

doc/neps/nep-0027-zero-rank-arrarys.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ arrays to scalars were summarized as follows:
105105

106106
- This results in a special-case checking that is not
107107
pleasant. Fundamentally it lets the user believe that
108-
somehow multidimensional homoegeneous arrays
108+
somehow multidimensional homogeneous arrays
109109
are something like Python lists (which except for
110110
Object arrays they are not).
111111

@@ -166,7 +166,7 @@ Alexander started a `Jan 2006 discussion`_ on scipy-dev
166166
with the following proposal:
167167

168168
... it may be reasonable to allow ``a[...]``. This way
169-
ellipsis can be interpereted as any number of ``:`` s including zero.
169+
ellipsis can be interpreted as any number of ``:`` s including zero.
170170
Another subscript operation that makes sense for scalars would be
171171
``a[...,newaxis]`` or even ``a[{newaxis, }* ..., {newaxis,}*]``, where
172172
``{newaxis,}*`` stands for any number of comma-separated newaxis tokens.

doc/neps/nep-0031-uarray.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Usage and Impact
102102
This NEP allows for global and context-local overrides, as well as
103103
automatic overrides a-la ``__array_function__``.
104104

105-
Here are some use-cases this NEP would enable, besides the
105+
Here are some use-cases this NEP would enable, besides the
106106
first one stated in the motivation section:
107107

108108
The first is allowing alternate dtypes to return their
@@ -114,7 +114,7 @@ respective arrays.
114114
x = unp.ones((5, 5), dtype=xnd_dtype) # Or torch dtype
115115
116116
The second is allowing overrides for parts of the API.
117-
This is to allow alternate and/or optimised implementations
117+
This is to allow alternate and/or optimized implementations
118118
for ``np.linalg``, BLAS, and ``np.random``.
119119

120120
.. code:: python
@@ -126,7 +126,7 @@ for ``np.linalg``, BLAS, and ``np.random``.
126126
np.set_global_backend(pyfftw)
127127
128128
# Uses pyfftw without monkeypatching
129-
np.fft.fft(numpy_array)
129+
np.fft.fft(numpy_array)
130130
131131
with np.set_backend(pyfftw) # Or mkl_fft, or numpy
132132
# Uses the backend you specified
@@ -200,10 +200,10 @@ GitHub workflow. There are a few reasons for this:
200200
The reason for this is that there may exist functions in the in these
201201
submodules that need backends, even for ``numpy.ndarray`` inputs.
202202

203-
Advantanges of ``unumpy`` over other solutions
203+
Advantages of ``unumpy`` over other solutions
204204
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
205205

206-
``unumpy`` offers a number of advantanges over the approach of defining a new
206+
``unumpy`` offers a number of advantages over the approach of defining a new
207207
protocol for every problem encountered: Whenever there is something requiring
208208
an override, ``unumpy`` will be able to offer a unified API with very minor
209209
changes. For example:
@@ -313,7 +313,7 @@ This is different from monkeypatching in a few different ways:
313313
All this isn't possible at all with ``__array_function__`` or
314314
``__array_ufunc__``.
315315

316-
It has been formally realised (at least in part) that a backend system is
316+
It has been formally realized (at least in part) that a backend system is
317317
needed for this, in the `NumPy roadmap <https://numpy.org/neps/roadmap.html#other-functionality>`_.
318318

319319
For ``numpy.random``, it's still necessary to make the C-API fit the one
@@ -347,7 +347,7 @@ dispatchable.
347347
The need for an opt-in module
348348
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
349349

350-
The need for an opt-in module is realised because of a few reasons:
350+
The need for an opt-in module is realized because of a few reasons:
351351

352352
* There are parts of the API (like `numpy.asarray`) that simply cannot be
353353
overridden due to incompatibility concerns with C/Cython extensions, however,
@@ -356,7 +356,7 @@ The need for an opt-in module is realised because of a few reasons:
356356
as those mentioned above.
357357

358358
NEP 18 notes that this may require maintenance of two separate APIs. However,
359-
this burden may be lessened by, for example, parametrizing all tests over
359+
this burden may be lessened by, for example, parameterizing all tests over
360360
``numpy.overridable`` separately via a fixture. This also has the side-effect
361361
of thoroughly testing it, unlike ``__array_function__``. We also feel that it
362362
provides an opportunity to separate the NumPy API contract properly from the

0 commit comments

Comments
 (0)