nlcpy.random.RandomState.bytes

RandomState.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.bytes(10)     
b'\x9fW\xc5\x12\x95\xfd\xba\x0fd\xff' # random