numpy.random.Generator.bytes

方法

random.Generator.bytes(length)

返回随机字节。

参数
length利息

随机字节数。

返回
outSTR

长度字符串 length .

实例

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