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

Method random

benchmarks/benchmarks/bench_function_base.py:150–156  ·  view source on GitHub ↗

Returns a randomly-shuffled array.

(size, dtype)

Source from the content-addressed store, hash-verified

148 @staticmethod
149 @memoize
150 def random(size, dtype):
151 """
152 Returns a randomly-shuffled array.
153 """
154 arr = np.arange(size, dtype=dtype)
155 np.random.shuffle(arr)
156 return arr
157
158 @staticmethod
159 @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

no outgoing calls

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