Skip to content

Commit fbdbc98

Browse files
committed
#152-doc review - README.md
Fixed typos. Notice: not included in release v2.0.0
1 parent dd69622 commit fbdbc98

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -594,28 +594,28 @@ Since the base class **BaseRandom** inherits from the built-in class `random.Ran
594594
**betavariate**(self, alpha, beta)
595595
Beta distribution.
596596

597-
Conditions on the parameters are alpha > 0 and beta > 0.
597+
Conditions on the parameters are `alpha > 0` and `beta > 0`.
598598
Returned values range between 0 and 1.
599599

600600

601601
**binomialvariate**(self, n=1, p=0.5)
602-
Binomial distribution. Return the number of successes for n independent trials with the probability of success in each trial being p:
602+
Binomial distribution. Return the number of successes for `n` independent trials with the probability of success in each trial being `p`:
603603

604604
Mathematically equivalent to:
605605

606606
sum(random() < p for i in range(n))
607607

608-
The number of trials n should be a non-negative integer. The probability of success p should be between 0.0 <= p <= 1.0. The result is an integer in the range 0 <= X <= n. This built-in, method has been added since Python 3.12. **PyRandLIb** implements it also for all former versions of Python: -3.6, -3.9, -3.10, and -3.11.
608+
The number of trials `n` should be a non-negative integer. The probability of success `p` should be between `0.0 <= p <= 1.0`. The result is an integer in the range `0 <= X <= n`. This built-in method has been added since Python 3.12. **PyRandLIb** implements it also for all former versions of Python: -3.6, -3.9, -3.10, and -3.11.
609609

610610

611611
**choice**(self, seq)
612-
Chooses a random element from a non-empty sequence. 'seq' has to be non empty.
612+
Chooses a random element from a non-empty sequence. `seq` has to be non empty.
613613

614614

615615
**choices**(population, weights=None, *, cum_weights=None, k=1)
616-
Returns a *k* sized list of elements chosen from the population, with replacement. If the population is empty, raises IndexError.
616+
Returns a `k` sized list of elements chosen from the population, with replacement. If the population is empty, raises `IndexError`.
617617

618-
If a *weights* sequence is specified, selections are made according to the relative weights. Alternatively, if a *cum_weights* sequence is given, the selections are made according to the cumulative weights (perhaps computed using `itertools.accumulate()`).
618+
If a `weights` sequence is specified, selections are made according to the relative weights. Alternatively, if a `cum_weights` sequence is given, the selections are made according to the cumulative weights (perhaps computed using `itertools.accumulate()`).
619619
For example, the relative weights `[10, 5, 30, 5]` are equivalent to the cumulative weights `[10, 15, 45, 50]`.
620620
Internally, the relative weights are converted to cumulative weights before making selections, so supplying the cumulative weights saves work.
621621

@@ -631,7 +631,7 @@ Exponential distribution.
631631

632632
`lambd` is 1.0 divided by the desired mean. It should be nonzero. (The parameter should be called "lambda", but this is a reserved word in Python).
633633
Returned values range from 0 to positive infinity if `lambd` is positive, and from negative infinity to 0 if `lambd` is negative.
634-
Since Python 3.12, the parameter `lambd` gets a default value in this built-in method. **PyRandLib** defines then this method for all former versions of Pyhton : -3.6, -3.9, -3.10 and -3.11.
634+
Since Python 3.12, the parameter `lambd` gets a default value in this built-in method. **PyRandLib** defines then this method for all former versions of Python : -3.6, -3.9, -3.10 and -3.11.
635635

636636

637637
**gammavariate**(self, alpha, beta)
@@ -643,8 +643,8 @@ Conditions on the parameters are `alpha` > 0 and `beta` > 0.
643643
**gauss**(self, mu, sigma)
644644
Gaussian distribution.
645645

646-
mu is the mean, and sigma is the standard deviation.
647-
This is slightly faster than the normalvariate() function.
646+
`mu` is the mean, and `sigma` is the standard deviation.
647+
This is slightly faster than the `normalvariate()` function.
648648

649649
Not thread-safe without a lock around calls.
650650

@@ -675,7 +675,7 @@ Pareto distribution. `alpha` is the shape parameter.
675675

676676

677677
**randint**(self, a, b)
678-
Returns a random integer in range [a, b], including both end points.
678+
Returns a random integer in range `[a, b]`, including both end points.
679679

680680

681681
**randrange**(self, stop)
@@ -710,9 +710,9 @@ Restores internal state from object returned by `getstate()`.
710710

711711

712712
**shuffle**(self, x, random=None)
713-
Shuffle the sequence x in place. Returns None.
713+
Shuffle the sequence `x` in place. Returns None.
714714

715-
The optional argument `random` is a 0-argument function returning a random float in [0.0, 1.0); by default, this is the function random().
715+
The optional argument `random` is a 0-argument function returning a random float in `[0.0, 1.0)`; by default, this is the function random().
716716

717717
To shuffle an immutable sequence and return a new shuffled list, use `sample(x, k=len(x))` instead.
718718

@@ -728,7 +728,7 @@ see [http://en.wikipedia.org/wiki/Triangular_distribution](http://en.wikipedia.o
728728

729729

730730
**uniform**(self, a, b)
731-
Gets a random number in the range [`a`, `b`) or [`a`, `b`] depending on rounding.
731+
Gets a random number in the range `[a, b)` or `[a, b]` depending on rounding.
732732

733733

734734
**vonmisesvariate**(self, mu, kappa)

0 commit comments

Comments
 (0)