xorbits.numpy.random.bytes#
- xorbits.numpy.random.bytes(length)[source]#
Return random bytes.
Note
New code should use the
bytesmethod of adefault_rng()instance instead; please see the random-quick-start.- Parameters
length (int) – Number of random bytes.
- Returns
out – String of length length.
- Return type
bytes
See also
random.Generator.byteswhich should be used for new code.
Examples
>>> np.random.bytes(10) b' eh\x85\x022SZ\xbf\xa4' #random
This docstring was copied from numpy.random.