MCPcopy
hub / github.com/numpy/numpy / random

Method random

benchmarks/benchmarks/bench_function_base.py:178–185  ·  view source on GitHub ↗

Returns a randomly-shuffled array.

(size, dtype, rnd)

Source from the content-addressed store, hash-verified

176 @staticmethod
177 @memoize
178 def random(size, dtype, rnd):
179 """
180 Returns a randomly-shuffled array.
181 """
182 arr = SortGenerator.ordered_range(size, dtype=dtype)
183 rnd = np.random.RandomState(1792364059)
184 rnd.shuffle(arr)
185 return arr
186
187 @staticmethod
188 @memoize

Callers 15

test_uniform_doubleMethod · 0.80
test_uniform_floatMethod · 0.80
warmupFunction · 0.80
test_jumpMethod · 0.80
test_randomMethod · 0.80
test_seedMethod · 0.80
test_uniform_floatMethod · 0.80
test_randomMethod · 0.80
test_random_floatMethod · 0.80

Calls 1

ordered_rangeMethod · 0.80

Tested by 15

test_uniform_doubleMethod · 0.64
test_uniform_floatMethod · 0.64
warmupFunction · 0.64
test_jumpMethod · 0.64
test_randomMethod · 0.64
test_seedMethod · 0.64
test_uniform_floatMethod · 0.64
test_randomMethod · 0.64
test_random_floatMethod · 0.64