Skip to content

Commit 0e058a0

Browse files
committed
Fixed spelling issues and added 7 new words to known list
1 parent c5b72f0 commit 0e058a0

15 files changed

+99
-122
lines changed

doc/known_words.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ ufunc
2323
ufuncs
2424
usm
2525
Vandermonde
26+
signum
27+
Infs
28+
subclasses
29+
th
30+
prepend
31+
eps
32+
whitespace

dpnp/dpnp_array.py

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class dpnp_array:
5454
Multi-dimensional array object.
5555
5656
This is a wrapper around dpctl.tensor.usm_ndarray that provides
57-
methods to be compliant with original Numpy.
57+
methods to be compliant with original NumPy.
5858
5959
"""
6060

@@ -137,15 +137,15 @@ def usm_type(self):
137137
return self._array_obj.usm_type
138138

139139
def __abs__(self):
140-
r"""Return \|self\|."""
140+
r"""Return ``\|self\|``."""
141141
return dpnp.abs(self)
142142

143143
def __add__(self, other):
144-
"""Return self+value."""
144+
"""Return ``self+value``."""
145145
return dpnp.add(self, other)
146146

147147
def __and__(self, other):
148-
"""Return self&value."""
148+
"""Return ``self&value``."""
149149
return dpnp.bitwise_and(self, other)
150150

151151
# '__array__',
@@ -197,7 +197,7 @@ def __float__(self):
197197
return self._array_obj.__float__()
198198

199199
def __floordiv__(self, other):
200-
"""Return self//value."""
200+
"""Return ``self//value``."""
201201
return dpnp.floor_divide(self, other)
202202

203203
# '__format__',
@@ -208,7 +208,7 @@ def __ge__(self, other):
208208
# '__getattribute__',
209209

210210
def __getitem__(self, key):
211-
"""Return self[key]."""
211+
"""Return ``self[key]``."""
212212
key = _get_unwrapped_index_key(key)
213213

214214
item = self._array_obj.__getitem__(key)
@@ -229,34 +229,34 @@ def __gt__(self, other):
229229
# '__hash__',
230230

231231
def __iadd__(self, other):
232-
"""Return self+=value."""
232+
"""Return ``self+=value``."""
233233
dpnp.add(self, other, out=self)
234234
return self
235235

236236
def __iand__(self, other):
237-
"""Return self&=value."""
237+
"""Return ``self&=value``."""
238238
dpnp.bitwise_and(self, other, out=self)
239239
return self
240240

241241
def __ifloordiv__(self, other):
242-
"""Return self//=value."""
242+
"""Return ``self//=value``."""
243243
dpnp.floor_divide(self, other, out=self)
244244
return self
245245

246246
def __ilshift__(self, other):
247-
"""Return self<<=value."""
247+
"""Return ``self<<=value``."""
248248
dpnp.left_shift(self, other, out=self)
249249
return self
250250

251251
# '__imatmul__',
252252

253253
def __imod__(self, other):
254-
"""Return self%=value."""
254+
"""Return ``self%=value``."""
255255
dpnp.remainder(self, other, out=self)
256256
return self
257257

258258
def __imul__(self, other):
259-
"""Return self*=value."""
259+
"""Return ``self*=value``."""
260260
dpnp.multiply(self, other, out=self)
261261
return self
262262

@@ -270,51 +270,51 @@ def __int__(self):
270270
return self._array_obj.__int__()
271271

272272
def __invert__(self):
273-
"""Return ~self."""
273+
"""Return ``~self``."""
274274
return dpnp.invert(self)
275275

276276
def __ior__(self, other):
277-
"""Return self|=value."""
277+
"""Return ``self|=value``."""
278278
dpnp.bitwise_or(self, other, out=self)
279279
return self
280280

281281
def __ipow__(self, other):
282-
"""Return self**=value."""
282+
"""Return ``self**=value``."""
283283
dpnp.power(self, other, out=self)
284284
return self
285285

286286
def __irshift__(self, other):
287-
"""Return self>>=value."""
287+
"""Return ``self>>=value``."""
288288
dpnp.right_shift(self, other, out=self)
289289
return self
290290

291291
def __isub__(self, other):
292-
"""Return self-=value."""
292+
"""Return ``self-=value``."""
293293
dpnp.subtract(self, other, out=self)
294294
return self
295295

296296
# '__iter__',
297297

298298
def __itruediv__(self, other):
299-
"""Return self/=value."""
299+
"""Return ``self/=value``."""
300300
dpnp.true_divide(self, other, out=self)
301301
return self
302302

303303
def __ixor__(self, other):
304-
"""Return self^=value."""
304+
"""Return ``self^=value``."""
305305
dpnp.bitwise_xor(self, other, out=self)
306306
return self
307307

308308
def __le__(self, other):
309309
return dpnp.less_equal(self, other)
310310

311311
def __len__(self):
312-
"""Return len(self)."""
312+
"""Return ``len(self)``."""
313313

314314
return self._array_obj.__len__()
315315

316316
def __lshift__(self, other):
317-
"""Return self<<value."""
317+
"""Return ``self<<value``."""
318318
return dpnp.left_shift(self, other)
319319

320320
def __lt__(self, other):
@@ -324,32 +324,32 @@ def __matmul__(self, other):
324324
return dpnp.matmul(self, other)
325325

326326
def __mod__(self, other):
327-
"""Return self%value."""
327+
"""Return ``self%value``."""
328328
return dpnp.remainder(self, other)
329329

330330
def __mul__(self, other):
331-
"""Return self*value."""
331+
"""Return ``self*value``."""
332332
return dpnp.multiply(self, other)
333333

334334
def __ne__(self, other):
335335
return dpnp.not_equal(self, other)
336336

337337
def __neg__(self):
338-
"""Return -self."""
338+
"""Return ``-self``."""
339339
return dpnp.negative(self)
340340

341341
# '__new__',
342342

343343
def __or__(self, other):
344-
"""Return self|value."""
344+
"""Return ``self|value``."""
345345
return dpnp.bitwise_or(self, other)
346346

347347
def __pos__(self):
348-
"""Return +self."""
348+
"""Return ``+self``."""
349349
return dpnp.positive(self)
350350

351351
def __pow__(self, other):
352-
"""Return self**value."""
352+
"""Return ``self**value``."""
353353
return dpnp.power(self, other)
354354

355355
def __radd__(self, other):
@@ -390,7 +390,7 @@ def __rrshift__(self, other):
390390
return dpnp.right_shift(other, self)
391391

392392
def __rshift__(self, other):
393-
"""Return self>>value."""
393+
"""Return ``self>>value``."""
394394
return dpnp.right_shift(self, other)
395395

396396
def __rsub__(self, other):
@@ -405,7 +405,7 @@ def __rxor__(self, other):
405405
# '__setattr__',
406406

407407
def __setitem__(self, key, val):
408-
"""Set self[key] to value."""
408+
"""Set ``self[key]`` to value."""
409409
key = _get_unwrapped_index_key(key)
410410

411411
if isinstance(val, dpnp_array):
@@ -432,17 +432,17 @@ def __str__(self):
432432
return self._array_obj.__str__()
433433

434434
def __sub__(self, other):
435-
"""Return self-value."""
435+
"""Return ``self-value``."""
436436
return dpnp.subtract(self, other)
437437

438438
# '__subclasshook__',
439439

440440
def __truediv__(self, other):
441-
"""Return self/value."""
441+
"""Return ``self/value``."""
442442
return dpnp.true_divide(self, other)
443443

444444
def __xor__(self, other):
445-
"""Return self^value."""
445+
"""Return ``self^value``."""
446446
return dpnp.bitwise_xor(self, other)
447447

448448
@staticmethod
@@ -558,8 +558,10 @@ def astype(self, dtype, order="K", casting="unsafe", subok=True, copy=True):
558558
- 'unsafe' means any data conversions may be done.
559559
560560
copy : bool, optional
561-
By default, astype always returns a newly allocated array. If this is set to false, and the dtype,
562-
order, and subok requirements are satisfied, the input array is returned instead of a copy.
561+
By default, ``astype`` always returns a newly allocated array. If
562+
this is set to ``False``, and the `dtype`, `order`, and `subok`
563+
requirements are satisfied, the input array is returned instead of
564+
a copy.
563565
564566
Returns
565567
-------
@@ -1323,9 +1325,9 @@ def transpose(self, *axes):
13231325
----------
13241326
axes : None, tuple or list of ints, n ints, optional
13251327
* ``None`` or no argument: reverses the order of the axes.
1326-
* tuple or list of ints: `i` in the `j`-th place in the tuple/list
1327-
means that the array’s `i`-th axis becomes the transposed
1328-
array’s `j`-th axis.
1328+
* tuple or list of integers: `i` in the `j`-th place in the
1329+
tuple/list means that the array’s `i`-th axis becomes the
1330+
transposed array’s `j`-th axis.
13291331
* n ints: same as an n-tuple/n-list of the same ints (this form is
13301332
intended simply as a “convenience” alternative to the tuple form).
13311333

dpnp/dpnp_iface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ def astype(x1, dtype, order="K", casting="unsafe", copy=True):
207207
- 'unsafe' means any data conversions may be done.
208208
209209
copy : bool, optional
210-
By default, astype always returns a newly allocated array. If this
211-
is set to ``False``, and the dtype, order, and subok requirements
210+
By default, ``astype`` always returns a newly allocated array. If this
211+
is set to ``False``, and the `dtype`, `order`, and `subok` requirements
212212
are satisfied, the input array is returned instead of a copy.
213213
214214
Returns

dpnp/dpnp_iface_arraycreation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ def asfortranarray(
640640
a, dtype=None, *, like=None, device=None, usm_type=None, sycl_queue=None
641641
):
642642
"""
643-
Return an array (ndim >= 1) laid out in Fortran order in memory.
643+
Return an array ``(ndim >= 1)`` laid out in Fortran order in memory.
644644
645645
For full documentation refer to :obj:`numpy.asfortranarray`.
646646

dpnp/dpnp_iface_manipulation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ def dstack(tup):
790790
:obj:`dpnp.hstack` : Stack arrays in sequence horizontally (column wise).
791791
:obj:`dpnp.column_stack` : Stack 1-D arrays as columns into a 2-D array.
792792
:obj:`dpnp.stack` : Join a sequence of arrays along a new axis.
793-
:obj:`dpnp.block` : Assemble an nd-array from nested lists of blocks.
793+
:obj:`dpnp.block` : Assemble an ndarray from nested lists of blocks.
794794
:obj:`dpnp.dsplit` : Split array along third axis.
795795
796796
Examples
@@ -1114,7 +1114,7 @@ def hstack(tup, *, dtype=None, casting="same_kind"):
11141114
:obj:`dpnp.dstack` : Stack arrays in sequence depth wise
11151115
(along third dimension).
11161116
:obj:`dpnp.column_stack` : Stack 1-D arrays as columns into a 2-D array.
1117-
:obj:`dpnp.block` : Assemble an nd-array from nested lists of blocks.
1117+
:obj:`dpnp.block` : Assemble an ndarray from nested lists of blocks.
11181118
:obj:`dpnp.split` : Split array into a list of multiple sub-arrays of equal
11191119
size.
11201120
@@ -1670,7 +1670,7 @@ def stack(arrays, /, *, axis=0, out=None, dtype=None, casting="same_kind"):
16701670
:obj:`dpnp.dstack` : Stack arrays in sequence depth wise
16711671
(along third dimension).
16721672
:obj:`dpnp.column_stack` : Stack 1-D arrays as columns into a 2-D array.
1673-
:obj:`dpnp.block` : Assemble an nd-array from nested lists of blocks.
1673+
:obj:`dpnp.block` : Assemble an ndarray from nested lists of blocks.
16741674
:obj:`dpnp.split` : Split array into a list of multiple sub-arrays of equal
16751675
size.
16761676
@@ -1973,7 +1973,7 @@ def vstack(tup, *, dtype=None, casting="same_kind"):
19731973
:obj:`dpnp.hstack` : Stack arrays in sequence horizontally (column wise).
19741974
:obj:`dpnp.dstack` : Stack arrays in sequence depth wise (along third axis).
19751975
:obj:`dpnp.column_stack` : Stack 1-D arrays as columns into a 2-D array.
1976-
:obj:`dpnp.block` : Assemble an nd-array from nested lists of blocks.
1976+
:obj:`dpnp.block` : Assemble an ndarray from nested lists of blocks.
19771977
:obj:`dpnp.split` : Split array into a list of multiple sub-arrays of equal
19781978
size.
19791979

dpnp/dpnp_iface_mathematical.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ def cumsum(a, axis=None, dtype=None, out=None):
841841
Input array.
842842
axis : int, optional
843843
Axis along which the cumulative sum is computed. The default (``None``)
844-
is to compute the cumsum over the flattened array.
844+
is to compute the cumulative sum over the flattened array.
845845
dtype : dtype, optional
846846
Type of the returned array and of the accumulator in which the elements
847847
are summed. If `dtype` is not specified, it defaults to the dtype of
@@ -936,7 +936,7 @@ def diff(a, n=1, axis=-1, prepend=None, append=None):
936936
a : {dpnp.ndarray, usm_ndarray}
937937
Input array
938938
n : int, optional
939-
The number of times values are differenced. If zero, the input
939+
The number of times the values differ. If ``zero``, the input
940940
is returned as-is.
941941
axis : int, optional
942942
The axis along which the difference is taken, default is the

dpnp/dpnp_iface_sorting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def argsort(a, axis=-1, kind=None, order=None):
100100
:obj:`dpnp.sort` : Return a sorted copy of an array.
101101
:obj:`dpnp.lexsort` : Indirect stable sort with multiple keys.
102102
:obj:`dpnp.argpartition` : Indirect partial sort.
103-
:obj:`dpnp.take_along_axis` : Apply ``index_array`` from argsort to
104-
an array as if by calling sort.
103+
:obj:`dpnp.take_along_axis` : Apply ``index_array`` from obj:`dpnp.argsort`
104+
to an array as if by calling sort.
105105
106106
Examples
107107
--------

dpnp/dpnp_iface_statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def average(a, axis=None, weights=None, returned=False, *, keepdims=False):
315315

316316
def bincount(x1, weights=None, minlength=0):
317317
"""
318-
Count number of occurrences of each value in array of non-negative ints.
318+
Count number of occurrences of each value in array of non-negative integers.
319319
320320
For full documentation refer to :obj:`numpy.bincount`.
321321

dpnp/linalg/dpnp_utils_linalg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ def dpnp_matrix_rank(A, tol=None, hermitian=False):
12811281
rtol = max(A.shape[-2:]) * dpnp.finfo(S.dtype).eps
12821282
tol = S.max(axis=-1, keepdims=True) * rtol
12831283
elif not dpnp.isscalar(tol):
1284-
# Add a new axis to match Numpy's output
1284+
# Add a new axis to match NumPy's output
12851285
tol = tol[..., None]
12861286

12871287
return dpnp.count_nonzero(S > tol, axis=-1)

0 commit comments

Comments
 (0)