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-precision in range [0, 1). Algorithm and seed can be changed via RandomOptions.
- Parameters:
- n
int Number of values to generate, must be greater than or equal to 0
- initializer
intorstr 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 with a system-specific source of (hopefully true) randomness. Other values are invalid.
- options
pyarrow.compute.RandomOptions, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool, optional If not passed, will allocate memory from the default memory pool.
- n