Skip to content

Random data generation

The functionality presented here provides users with utilities for the creation of random data.

seed

seed(seed)

Set random seed for PyKX random data generation

Parameters:

Name Type Description Default
seed int

Integer value defining the seed value to be set

required

Returns:

Type Description
None

On successful invocation this function returns None

random

random(dimensions, data, seed=None)

Return random data of specified dimensionality

Parameters:

Name Type Description Default
dimensions Union[int, List[int]]

The dimensions of the data returned. Will produce a 1D array if single integer

required
data Any

The data from which a random sample is chosen. If an int or a float is passed,

required
seed Optional[int]

Denotes whether or not a seed should be used in the generation of data. Defaulted to

None

Returns:

Type Description
Any

Randomised data in the shape specified by the 'dimensions' variable