MCPcopy Create free account
hub / github.com/apache/arrow / generate_tuple_list

Method generate_tuple_list

python/benchmarks/common.py:246–256  ·  view source on GitHub ↗

Generate a list of tuples with random values. Each tuple has the form `(int value, float value, bool value)`

(self, n, none_prob=DEFAULT_NONE_PROB)

Source from the content-addressed store, hash-verified

244 n, min_size, max_size, none_prob)
245
246 def generate_tuple_list(self, n, none_prob=DEFAULT_NONE_PROB):
247 """
248 Generate a list of tuples with random values.
249 Each tuple has the form `(int value, float value, bool value)`
250 """
251 dicts = self.generate_dict_list(n, none_prob=none_prob)
252 tuples = [(d.get('u'), d.get('v'), d.get('w'))
253 if d is not None else None
254 for d in dicts]
255 assert len(tuples) == n
256 return tuples
257
258 def generate_dict_list(self, n, none_prob=DEFAULT_NONE_PROB):
259 """

Callers

nothing calls this directly

Calls 3

generate_dict_listMethod · 0.95
lenFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected