pyarrow.compute.random#

pyarrow.compute.random(n,*,initializer='system',options=None,memory_pool=None)[source]#

Generate numbers in the range [0, 1).

Generated values are uniformly-distributed, double-precisionin range [0, 1). Algorithm and seed can be changed via RandomOptions.

Parameters:
nint

Number of values to generate, must be greater than or equal to 0

initializerint orstr

How to initialize the underlying random generator.If an integer is given, it is used as a seed.If “system” is given, the random generator is initialized witha system-specific source of (hopefully true) randomness.Other values are invalid.

optionspyarrow.compute.RandomOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.