def permutation(random_state, size=None, n=1, ndim=None, dtype='int64'):
 if ((size is None) or (size == ())):
  if (not ((ndim is None) or (ndim == 1))):
   raise TypeError('You asked for just one permutation but asked for more then 1 dimensions.')
  ndim = 1
  size = ()
  bcast = ()
 else:
  (ndim, size, bcast) = _infer_ndim_bcast(ndim, size)
 op = RandomFunction(permutation_helper, tensor.TensorType(dtype=dtype, broadcastable=(bcast + (False,))), ndim_added=1)
 return op(random_state, size, n)

def permutation ( random_state , size = None , n = 1 , ndim = None , dtype = 'int64' ) : if ( ( size is None ) or ( size == ( ) ) ) : if ( not ( ( ndim is None ) or ( ndim == 1 ) ) ) : raise TypeError ( 'You asked for just one permutation but asked for more then 1 dimensions.' ) ndim = 1 size = ( ) bcast = ( ) else : ( ndim , size , bcast ) = _infer_ndim_bcast ( ndim , size ) op = RandomFunction ( permutation_helper , tensor . TensorType ( dtype = dtype , broadcastable = ( bcast + ( False , ) ) ) , ndim_added = 1 ) return op ( random_state , size , n )
return permutations of the integers between 0 and n-1 .