random.
bytes
返回随机字节。
注解
新代码应该使用 bytes A方法 default_rng() 请参阅 快速启动 .
default_rng()
随机字节数。
长度字符串 length .
参见
Generator.bytes
应该用于新代码。
实例
>>> np.random.bytes(10) ' eh\x85\x022SZ\xbf\xa4' #random