MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _random_subset

Function _random_subset

tensorflow/python/kernel_tests/tensordot_op_test.py:142–144  ·  view source on GitHub ↗
(m, n)

Source from the content-addressed store, hash-verified

140
141 # Select a random subset of size m from [0, 1, ..., n-1].
142 def _random_subset(m, n):
143 assert m <= n
144 return (np.random.permutation(n)[:m]).astype(np.int32)
145
146 def _generate_random_tensors_and_dims():
147 a_shape = np.random.random_integers(1, _MAXDIM, rank_a_)

Callers 1

Calls 1

permutationMethod · 0.45

Tested by

no test coverage detected