earthkit.meteo.score.array.iter_samples¶
- earthkit.meteo.score.array.iter_samples(x, *args, dim=0, n_iter=100, n_samples=None, replace=True, rng=None)¶
Iterate over resampled arrays for bootstrapping.
- Parameters:
x (
array-like) – Arrays to sample. Must have the same size alongdim*args (
array-like) – Arrays to sample. Must have the same size alongdimdim (
intorlistofint) – Sample along this dimension index (either same for all or one per argument)n_iter (
int) – Number of bootstrapping iterationsn_samples (
intorNone) – Number of samples for each iteration. If None, use the number of inputs (size ofxalong the sampling dimension)replace (
bool) – Sample with replacement (on by default)rng (
numpy.random.Generator) – Random number generator
- Yields:
tuple– Resampled arrays (one element per input array, one yield per iteration)- Return type:
collections.abc.Generator[tuple[ArrayLike, Ellipsis], None, None]