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

Method generate_object_list

python/benchmarks/common.py:171–178  ·  view source on GitHub ↗

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

(self, n, none_prob=DEFAULT_NONE_PROB)

Source from the content-addressed store, hash-verified

169 return data
170
171 def generate_object_list(self, n, none_prob=DEFAULT_NONE_PROB):
172 """
173 Generate a list of generic Python objects with *none_prob*
174 probability of an entry being None.
175 """
176 data = [object() for i in range(n)]
177 self.sprinkle_nones(data, none_prob)
178 return data
179
180 def _generate_varying_sequences(self, random_factory, n, min_size,
181 max_size, none_prob):

Callers 1

setupMethod · 0.95

Calls 1

sprinkle_nonesMethod · 0.95

Tested by

no test coverage detected