Skip To Content

CreateRandomValueGenerator

Summary

Creates a new random number generator.

Discussion

Legacy:

arcgis.rand() is no longer supported as of ArcGIS Pro 2.0. The arcgis.rand() function was primarily used to support creation of random values with the Calculate Value and Calculate Field tools, the Random Number Generator environment setting, and the CreateRandomValueGenerator function. Comparable functions using Python's random module should be used instead.

Syntax

CreateRandomValueGenerator (seed, distribution)
ParameterExplanationData Type
seed

Initializes the random number generator.

Integer
distribution

The random generation algorithm.

  • ACM599ACM collected algorithm 599
  • MERSENNE_TWISTERMersenne Twister mt19937
  • STANDARD_CStandard C Rand

(The default value is ACM599)

String
Return Value
Data TypeExplanation
Object

A RandomNumberGenerator object.

Related topics