nlcpy.random.Generator.bytes

Generator.bytes(self, length)

Returns random bytes.

Parameters
lengthint

Number of random bytes.

Returns
outstr

String of length length.

Examples

>>> import nlcpy as vp
>>> vp.random.default_rng().bytes(10)  
b'\x9fW\xc5\x12\x95\xfd\xba\x0fd\xff' # random