classmethod galois.Array.Random(shape: ShapeLike = (), low: ElementLike = 0, high: ElementLike | None = None, seed: int | Generator | None = None, dtype: DTypeLike | None = None) Self

Creates an array with random elements.

Parameters:
shape: ShapeLike = ()

A NumPy-compliant shape tuple. The default is () which represents a scalar.

low: ElementLike = 0

The smallest element (inclusive). The default is 0.

high: ElementLike | None = None

The largest element (exclusive). The default is None which represents order.

seed: int | Generator | None = None

Non-negative integer used to initialize the PRNG. The default is None which means that unpredictable entropy will be pulled from the OS to be used as the seed. A numpy.random.Generator can also be passed.

dtype: DTypeLike | None = None

The numpy.dtype of the array elements. The default is None which represents the smallest unsigned data type for this Array subclass (the first element in dtypes).

Returns:

An array of random elements.