utils

class ArrayToArray(*args, **kwargs)

Bases: Protocol

class Experiment(num_runs, *, random_state=None)

Bases: object

Parameters:
  • num_runs (int)

  • random_state (Optional[np.random.Generator | int])

add(data)
Return type:

None

Parameters:

data (Any)

barrier()
Return type:

None

broadcast(data)
Return type:

TypeVar(T)

Parameters:

data (T)

collect()
Return type:

dict[int, Any]

get_random_state(run, *, num_runs)
Return type:

Generator

Parameters:
property is_distributed: bool
property is_root: bool
property num_runs: int
property performs_run: bool
property random_state: Generator
property run: int
class PairedArraysToArray(*args, **kwargs)

Bases: Protocol

class SmoothingFunction(*args, **kwargs)

Bases: Protocol

class ToArray(*args, **kwargs)

Bases: Protocol

available_resources(*, ensure_parallel_inner=True)
Return type:

tuple[int, int]

Parameters:

ensure_parallel_inner (bool)

class_name(obj)
Return type:

str

Parameters:

obj (object)

closest_odd_divisible(number, divisor)
Return type:

int

Parameters:
flatten(array, ensure_2d=True)
Return type:

ndarray

Parameters:
hash_dict(dictionary)

Hashes a dictionary to a SHA1 hexadecimal string.

Parameters:

dictionary (dict) – The dictionary to hash. All keys and values must be json-serializable.

Returns:

The SHA1 hexadecimal hash of the dictionary.

Return type:

str

pad_values(array, step, value)
Return type:

ndarray

Parameters:
perform_operation(operation_func, array_1, array_2, element_wise, flat, expand_dims_for_broadcasting=True)
Parameters:
to_int_seed(random_state)
Return type:

int

Parameters:

random_state (Generator)

to_scalars(values)
Return type:

list

Parameters:

values (Any)