MCPcopy Create free account
hub / github.com/numpy/numpy / uniform

Method uniform

benchmarks/benchmarks/bench_function_base.py:176–180  ·  view source on GitHub ↗

Returns an array that has the same value everywhere.

(size, dtype)

Source from the content-addressed store, hash-verified

174 @staticmethod
175 @memoize
176 def uniform(size, dtype):
177 """
178 Returns an array that has the same value everywhere.
179 """
180 return np.ones(size, dtype=dtype)
181
182 @staticmethod
183 @memoize

Callers 15

test_generator_spawningFunction · 0.80
test_uniformMethod · 0.80
test_uniformMethod · 0.80
test_uniform_arrayMethod · 0.80
test_uniformMethod · 0.80
test_uniformMethod · 0.80
test_uniformMethod · 0.80

Calls

no outgoing calls

Tested by 15

test_generator_spawningFunction · 0.64
test_uniformMethod · 0.64
test_uniformMethod · 0.64
test_uniform_arrayMethod · 0.64
test_uniformMethod · 0.64
test_uniformMethod · 0.64
test_uniformMethod · 0.64
test_log_stridesMethod · 0.64