Return random bytes.
Note
New code should use the bytes method of a Generator instance instead; please see the Quick start.
Number of random bytes.
String of length length.
See also
random.Generator.byteswhich should be used for new code.
>>> np.random.bytes(10) b' eh\x85\x022SZ\xbf\xa4' #random
© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/random/generated/numpy.random.bytes.html