@@ -398,6 +398,7 @@ def weibullvariate(alpha, beta):
398398 """
399399 return _pyrand ().weibullvariate (alpha , beta )
400400
401+
401402def choices (population , weights = None , * , cum_weights = None , k = 1 ):
402403 r"""
403404 Return a k sized list of elements chosen from the population with
@@ -420,7 +421,8 @@ def choices(population, weights=None, *, cum_weights=None, k=1):
420421 [4, 2, 3, 2, 3, 3, 2, 4, 3, 3]
421422 """
422423 return _pyrand ().choices (population , weights = weights , cum_weights = cum_weights , k = k )
423-
424+
425+
424426def randbytes (n ):
425427 r"""
426428 Generate n random bytes
@@ -432,6 +434,7 @@ def randbytes(n):
432434 """
433435 return _pyrand ().randbytes (n )
434436
437+
435438def triangular (low = 0.0 , high = 1.0 , mode = None ):
436439 r"""
437440 Triangular distribution.
@@ -446,4 +449,4 @@ def triangular(low=0.0, high=1.0, mode=None):
446449 sage: all(s >= 1.0 for s in sample) #random
447450 True
448451 """
449- return _pyrand ().triangular (low , high , mode )
452+ return _pyrand ().triangular (low , high , mode )
0 commit comments