CreateRandomValueGenerator

Resumen

The CreateRandomValueGenerator function creates a random number generator.

Debate

Heredado:

arcgis.rand() ya no se admite desde ArcGIS Pro 2.0. La función arcgis.rand() se usaba principalmente para permitir la creación de valores aleatorios con las herramientas Calcular valor y Calcular campo, la configuración del entorno Generador de números aleatorios y la función CreateRandomValueGenerator. En su lugar, se deben usar otras funciones similares del módulo random de Python.

Sintaxis

CreateRandomValueGenerator (seed, distribution)
ParámetroExplicaciónTipo de datos
seed

Initializes the random number generator.

Integer
distribution

Specifies the random generation algorithm that will be used.

  • ACM599The ACM collected algorithm 599 will be used.
  • MERSENNE_TWISTERThe Mersenne Twister mt19937 algorithm will be used.
  • STANDARD_CThe Standard C Rand algorithm will be used.

(El valor predeterminado es ACM599)

String
Valor de retorno
Tipo de datosExplicación
Object

A RandomNumberGenerator object.

Temas relacionados