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

Method generate_int_list

python/benchmarks/common.py:126–133  ·  view source on GitHub ↗

Generate a list of Python ints with *none_prob* probability of an entry being None.

(self, n, none_prob=DEFAULT_NONE_PROB)

Source from the content-addressed store, hash-verified

124 self.sprinkle(lst, prob, None)
125
126 def generate_int_list(self, n, none_prob=DEFAULT_NONE_PROB):
127 """
128 Generate a list of Python ints with *none_prob* probability of
129 an entry being None.
130 """
131 data = list(range(n))
132 self.sprinkle_nones(data, none_prob)
133 return data
134
135 def generate_float_list(self, n, none_prob=DEFAULT_NONE_PROB,
136 use_nan=False):

Callers 2

setupMethod · 0.95
generate_dict_listMethod · 0.95

Calls 2

sprinkle_nonesMethod · 0.95
listFunction · 0.85

Tested by

no test coverage detected