flopscope.

flopscope.numpy.random.RandomState.bytes

fnp.random.RandomState.bytes(self, length)

Return random bytes.

Adapted from NumPy docs np.random.RandomState.bytes

Arearandom
Typecounted
Cost
length\text{length}
Flopscope Context

Legacy bytes sampler; cost = length argument.

Note.

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

Parameters

length:int

Number of random bytes.

Returns

out:bytes

String of length length.

See also

Examples

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