permutation

dragon.random.permutation(
  limit,
  dtype='int64',
  **kwargs
)[source]

Return a tensor with value in the permuted range.

Specify limit to determine an interval \([0, \text{limit})\):

x = dragon.permutation(4)
Parameters:
  • limit (number) – The end of interval.
  • dtype (str, optional, default='int64') – The optional data type.
Returns:

dragon.Tensor – The output tensor.