xorbits.numpy.random.bytes#

xorbits.numpy.random.bytes(length)[源代码]#

Return random bytes.

备注

New code should use the ~numpy.random.Generator.bytes method of a ~numpy.random.Generator instance instead; please see the random-quick-start.

参数

length (int) – Number of random bytes.

返回

out – String of length length.

返回类型

bytes

参见

random.Generator.bytes

which should be used for new code.

实际案例

>>> np.random.bytes(10)  
b' eh\x85\x022SZ\xbf\xa4' #random

This docstring was copied from numpy.random.