Skip to content

Commit 1c0a881

Browse files
committed
Fixed spelling issues and added 4 new words to known list
1 parent d991cfa commit 1c0a881

File tree

6 files changed

+33
-7
lines changed

6 files changed

+33
-7
lines changed

doc/known_words.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,29 @@ NaN
3333
NaT
3434
ndarray
3535
ndarrays
36+
ndim
3637
oneAPI
3738
Penrose
3839
Polyutils
3940
prepend
41+
prepending
4042
representable
4143
runtimes
4244
scikit
45+
signbit
4346
signum
4447
subarray
4548
subarrays
4649
subclasses
50+
subtype
4751
th
4852
ufunc
4953
ufuncs
5054
Unary
5155
unicode
5256
usm
5357
Vandermonde
54-
Von
58+
von
5559
Weibull
5660
whitespace
5761
Zipf

dpnp/dpnp_iface_indexing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,8 @@ def putmask(x1, mask, values):
779779

780780
def select(condlist, choicelist, default=0):
781781
"""
782-
Return an array drawn from elements in choicelist, depending on conditions.
782+
Return an array drawn from elements in `choicelist`, depending on
783+
conditions.
783784
784785
For full documentation refer to :obj:`numpy.select`.
785786

dpnp/dpnp_iface_manipulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ def rollaxis(x, axis, start=0):
15071507
-------
15081508
out : dpnp.ndarray
15091509
An array with the same data type as `x` where the specified axis
1510-
has been repositioned to the desired position.
1510+
has been moved to the requested position.
15111511
15121512
See Also
15131513
--------

dpnp/dpnp_iface_mathematical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2646,7 +2646,7 @@ def prod(
26462646
26472647
Limitations
26482648
-----------
2649-
Parameters `where` nd `subok` are supported with their default values.
2649+
Parameters `where` and `subok` are supported with their default values.
26502650
Keyword argument `kwargs` is currently unsupported.
26512651
Otherwise ``NotImplementedError`` exception will be raised.
26522652

dpnp/dpnp_iface_searching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def searchsorted(a, v, side="left", sorter=None):
245245
Default is ``'left'``.
246246
sorter : {dpnp.ndarray, usm_ndarray}, optional
247247
Optional 1-D array of integer indices that sort array a into ascending
248-
order. They are typically the result of argsort.
248+
order. They are typically the result of :obj:`dpnp.argsort`.
249249
Out of bound index values of `sorter` array are treated using `"wrap"`
250250
mode documented in :py:func:`dpnp.take`.
251251
Default is ``None``.

dpnp/random/dpnp_iface_random.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def beta(a, b, size=None):
133133
Examples
134134
--------
135135
Draw samples from the distribution:
136+
136137
>>> a, b = .4, .5 # alpha, beta
137138
>>> s = dpnp.random.beta(a, b, 1000)
138139
@@ -170,6 +171,7 @@ def binomial(n, p, size=None):
170171
Examples
171172
--------
172173
Draw samples from the distribution:
174+
173175
>>> n, p = 10, .5 # number of trials, probability of each trial
174176
>>> s = dpnp.random.binomial(n, p, 1000)
175177
# result of flipping a coin 10 times, tested 1000 times.
@@ -297,6 +299,7 @@ def exponential(scale=1.0, size=None):
297299
Examples
298300
--------
299301
Draw samples from the distribution:
302+
300303
>>> scale = .5 # alpha
301304
>>> s = dpnp.random.exponential(scale, 1000)
302305
@@ -366,6 +369,7 @@ def gamma(shape, scale=1.0, size=None):
366369
Examples
367370
--------
368371
Draw samples from the distribution:
372+
369373
>>> shape, scale = 0, 0.1 # shape and scale
370374
>>> s = dpnp.random.gamma(shape, scale, 1000)
371375
@@ -404,6 +408,7 @@ def geometric(p, size=None):
404408
--------
405409
Draw ten thousand values from the geometric distribution,
406410
with the probability of an individual success equal to 0.35:
411+
407412
>>> z = dpnp.random.geometric(p=0.35, size=10000)
408413
409414
"""
@@ -436,6 +441,7 @@ def gumbel(loc=0.0, scale=1.0, size=None):
436441
Examples
437442
--------
438443
Draw samples from the distribution:
444+
439445
>>> mu, beta = 0, 0.1 # location and scale
440446
>>> s = dpnp.random.gumbel(mu, beta, 1000)
441447
@@ -472,6 +478,7 @@ def hypergeometric(ngood, nbad, nsample, size=None):
472478
Examples
473479
--------
474480
Draw samples from the distribution:
481+
475482
>>> ngood, nbad, nsamp = 100, 2, 10
476483
# number of good, number of bad, and number of samples
477484
>>> s = dpnp.random.hypergeometric(ngood, nbad, nsamp, 1000)
@@ -595,6 +602,7 @@ def lognormal(mean=0.0, sigma=1.0, size=None):
595602
Examples
596603
--------
597604
Draw samples from the distribution:
605+
598606
>>> mu, sigma = 3., 1. # mean and standard deviation
599607
>>> s = dpnp.random.lognormal(mu, sigma, 1000)
600608
@@ -647,6 +655,7 @@ def multinomial(n, pvals, size=None):
647655
Examples
648656
--------
649657
Throw a dice 20 times:
658+
650659
>>> s = dpnp.random.multinomial(20, [1/6.]*6, size=1)
651660
>>> s.shape
652661
(1, 6)
@@ -816,6 +825,7 @@ def normal(
816825
Examples
817826
--------
818827
Draw samples from the distribution:
828+
819829
>>> mu, sigma = 0, 0.1 # mean and standard deviation
820830
>>> s = dpnp.random.normal(mu, sigma, 1000)
821831
@@ -885,6 +895,7 @@ def pareto(a, size=None):
885895
Examples
886896
--------
887897
Draw samples from the distribution:
898+
888899
>>> a = .5 # alpha
889900
>>> s = dpnp.random.pareto(a, 1000)
890901
@@ -953,6 +964,7 @@ def poisson(lam=1.0, size=None):
953964
Examples
954965
--------
955966
Draw samples from the distribution:
967+
956968
>>> import numpy as np
957969
>>> s = dpnp.random.poisson(5, 10000)
958970
@@ -987,6 +999,7 @@ def power(a, size=None):
987999
Examples
9881000
--------
9891001
Draw samples from the distribution:
1002+
9901003
>>> a = .5 # alpha
9911004
>>> s = dpnp.random.power(a, 1000)
9921005
@@ -1093,6 +1106,7 @@ def randint(
10931106
Examples
10941107
--------
10951108
Draw samples from the distribution:
1109+
10961110
>>> low, high = 3, 11 # low and high
10971111
>>> s = dpnp.random.randint(low, high, 1000, dtype=dpnp.int32)
10981112
@@ -1364,6 +1378,7 @@ def rayleigh(scale=1.0, size=None):
13641378
Examples
13651379
--------
13661380
Draw samples from the distribution:
1381+
13671382
>>> import numpy as np
13681383
>>> s = dpnp.random.rayleigh(1.0, 10000)
13691384
@@ -1514,6 +1529,7 @@ def standard_cauchy(size=None):
15141529
Examples
15151530
--------
15161531
Draw samples and plot the distribution:
1532+
15171533
>>> import matplotlib.pyplot as plt
15181534
>>> s = dpnp.random.standard_cauchy(1000000)
15191535
>>> s = s[(s>-25) & (s<25)] # truncate distribution so it plots well
@@ -1542,6 +1558,7 @@ def standard_exponential(size=None):
15421558
Examples
15431559
--------
15441560
Output a 3x8000 array:
1561+
15451562
>>> n = dpnp.random.standard_exponential((3, 8000))
15461563
15471564
"""
@@ -1568,6 +1585,7 @@ def standard_gamma(shape, size=None):
15681585
Examples
15691586
--------
15701587
Draw samples from the distribution:
1588+
15711589
>>> shape = 2.
15721590
>>> s = dpnp.random.standard_gamma(shape, 1000000)
15731591
@@ -1615,6 +1633,7 @@ def standard_normal(size=None, device=None, usm_type="device", sycl_queue=None):
16151633
Examples
16161634
--------
16171635
Draw samples from the distribution:
1636+
16181637
>>> s = dpnp.random.standard_normal(1000)
16191638
16201639
"""
@@ -1640,6 +1659,7 @@ def standard_t(df, size=None):
16401659
Examples
16411660
--------
16421661
Draw samples from the distribution:
1662+
16431663
>>> df = 2.
16441664
>>> s = dpnp.random.standard_t(df, 1000000)
16451665
@@ -1675,6 +1695,7 @@ def triangular(left, mode, right, size=None):
16751695
Examples
16761696
--------
16771697
Draw samples from the distribution:
1698+
16781699
>>> df = 2.
16791700
>>> s = dpnp.random.triangular(-3, 0, 8, 1000000)
16801701
@@ -1746,6 +1767,7 @@ def uniform(
17461767
Examples
17471768
--------
17481769
Draw samples from the distribution:
1770+
17491771
>>> low, high = 0, 0.1 # low and high
17501772
>>> s = dpnp.random.uniform(low, high, 10000)
17511773
@@ -1763,8 +1785,6 @@ def uniform(
17631785

17641786
def vonmises(mu, kappa, size=None):
17651787
"""
1766-
Von Mises distribution.
1767-
17681788
Draw samples from a von Mises distribution.
17691789
17701790
For full documentation refer to :obj:`numpy.random.vonmises`.
@@ -1779,6 +1799,7 @@ def vonmises(mu, kappa, size=None):
17791799
Examples
17801800
--------
17811801
Draw samples from the distribution:
1802+
17821803
>>> mu, kappa = 0.0, 4.0 # mean and dispersion
17831804
>>> s = dpnp.random.vonmises(mu, kappa, 1000)
17841805

0 commit comments

Comments
 (0)