scippuncertainty.mc.sampler.Sampler#

class scippuncertainty.mc.sampler.Sampler(*args, **kwargs)[source]#

Protocol for MC data re-samplers.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

clone()

Return a new sampler of the same type.

sample_once(rng)

Return a single new sample.

clone()[source]#

Return a new sampler of the same type.

The returned sampler is independent of self and samples from the same data.

Return type:

TypeVar(S, bound= Sampler)

sample_once(rng)[source]#

Return a single new sample.

Parameters:

rng (Generator) – Use this as the only source of randomness to ensure reproducibility.

Returns:

DataArray – A new sample.