data#

import tensorwaves.data

The data module takes care of data generation.

class NumpyDomainGenerator(boundaries: dict[str, tuple[float, float]])[source]#

Bases: DataGenerator

Generate a uniform DataSample as a domain for a Function.

Parameters:

boundaries – A mapping of the keys in the DataSample that is to be generated. The boundaries have to be a tuple of a minimum and a maximum value that define the range for each key in the DataSample.

generate(size: int, rng: RealNumberGenerator) DataSample[source]#

Generate a DataSample with size events.

Returns:

A tuple of a DataSample with an array of weights.

class IntensityDistributionGenerator(domain_generator: DataGenerator, function: Function[DataSample, ndarray], domain_transformer: DataTransformer | None = None, bunch_size: int = 50000)[source]#

Bases: DataGenerator

Generate an hit-and-miss DataSample distribution for a Function.

Parameters:
generate(size: int, rng: RealNumberGenerator) DataSample[source]#

Generate a DataSample with size events.

Returns:

A tuple of a DataSample with an array of weights.

Submodules and Subpackages