Removed
- `cmomy.randsamp_freq` has been replaced with `cmomy.factory_sampler`
Added
- `cmomy.factory_sampler` to create a sampler for resample routines.
- `cmomy.IndexSampler` to wrap resample "indices" and "freq" table.
Changed
- Added `IndexSampler` class to handle resampling. This wraps either resampling
`indices` or a "frequency" table `freq`, and can produce whichever is not
provided.
- replace `randsamp_freq` with `factory_sampler` which creates `IndexSampler`
from parameters or a mapping.
- Removed arguments `freq`, `nrep`, `rng`, `paired` from resampling routines
(`resample_data`, etc). This was replaced by an arguments `sampler` which can
be either an `IndexSampler` or a mapping which is passed to `factory_sampler`.
This means that to call the resampling routines, you'll have to pass a sampler
or a dict of parameters. While this is a little annoying, it greatly cleans up
a bunch of parameters that may not be used. For example, the call
`cmomy.resample_data(data, axis=0, nrep=10, rng=0)` is now
`cmomy.resampler_data(data, axis=0, sampler={"nrep": 10, "rng": 0})`. Plus,
you can now pass `indices` with
`cmomy.resample_data(data, axis=0, sampler={"indices": indices})`
- Removed parameter `on_missing_core_dim` from routines that call
`xarray.apply_ufunc` behind the scenese. You can still pass this parameter
using `apply_ufunc_kwargs`. For example,
`cmomy.reduce_data(data, axis=0, apply_ufunc_kwargs={"on_missing_core_dim": "drop"})`.