This is a pre-release version (latest). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / numpy / random / RandomState / bytes

cython_function_or_method

numpy.random:RandomState.bytes

Signature

def   bytes ( length )

Summary

Return random bytes.

Extended Summary

Parameters

length : int

Number of random bytes.

Returns

out : bytes

String of length length.

Examples

np.random.bytes(10)

See also

random.Generator.bytes

which should be used for new code.

Aliases

  • numpy.random.bytes
  • numpy.random.RandomState.bytes