scippuncertainty.mc.sampler.NormalDenseSampler#
- class scippuncertainty.mc.sampler.NormalDenseSampler(data, copy=True, copy_in=True)[source]#
Resample dense data from a Normal distribution.
Generates data arrays with the same metadata as the input and
valuesdrawn from a normal distribution withmean = input.valuesandstandard_deviation = sqrt(input.variances).The input data must be dense, i.e. not binned.
- __init__(data, copy=True, copy_in=True)[source]#
Initialize a NormalDenseSampler.
- Parameters:
data (
DataArray) – Input data to sample from.copy (
bool, default:True) – IfTrue,NormalDenseSampler.sample_once()returns a new array. IfFalse, it returns a reference to the same array every time but updates the values in-place. Use with caution!copy_in (
bool, default:True) – IfTrue,datais copied during initialization. IfFalse, the sampler keeps a reference to the input object.
Methods
__init__(data[, copy, copy_in])Initialize a NormalDenseSampler.
clone()Return a new NormalDenseSampler.
sample_once(rng)Return a new sample.