earthkit.meteo.score.resample¶
- earthkit.meteo.score.resample(x: ArrayLike, *args: ArrayLike, dim: int | list[int] = 0, out_dim: int = 0, n_iter: int = 100, n_samples: int | None = None, replace: bool = True, rng: numpy.random.Generator | None = None) tuple[ArrayLike, Ellipsis]¶
- earthkit.meteo.score.resample(x: xarray.DataArray, *args: xarray.DataArray, dim: str = None, out_dim: str = 'sample', n_iter: int = 100, n_samples: int | None = None, replace: bool = True, rng: numpy.random.Generator | None = None) tuple[xarray.DataArray, Ellipsis]
Resample arrays for bootstrapping.
- Parameters:
x (
xarray objectorarray-like) – Arrays to sample. Must have the same size alongdim*args (
xarray objectorarray-like) – Arrays to sample. Must have the same size alongdimdim (
strorintorlistofint) – Sample along this dimension (name or index/indices for array-like)out_dim (
strorint) – Output dimension name (or index for array-like) for samplesn_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
- Returns:
Resampled arrays (one element per input array)
- Return type:
tuple