mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
54786902c3
added test [#CLICKHOUSE-3305] added test [#CLICKHOUSE-3305] added test [#CLICKHOUSE-3305] added test [#CLICKHOUSE-3305] added test [#CLICKHOUSE-3305] added test [#CLICKHOUSE-3305] added test [#CLICKHOUSE-3305]
16 lines
438 B
Python
16 lines
438 B
Python
import numpy as np
|
|
|
|
|
|
def generate_uniform_int_column(size, low, high, seed=0):
|
|
np.random.seed(seed)
|
|
return np.random.randint(low, high, size)
|
|
|
|
|
|
def generate_uniform_float_column(size, low, high, seed=0):
|
|
np.random.seed(seed)
|
|
return np.random.random(size) * (high - low) + low
|
|
|
|
|
|
def generate_uniform_string_column(size, samples, seed):
|
|
return np.array(samples)[generate_uniform_int_column(size, 0, len(samples), seed)]
|